Capture and compress image
1) Capture your image and save it.
A few tips on capturing images:
- Capture the smallest image resolution that’s readable.
- It’s okay to cut off parts of a dialog or screen that aren’t relevant (e.g. cut off the right half or bottom parts if they are not relevant)
- Scale your image to the proper size before capturing (e.g. zoom your browser out) rather than resizing and already-captured image (which will blur fonts)
- .png images are often smaller than .jpg for dialogs and forms.
2) If you’ve saved your images as a .png, go to compresspng.com and compress the image. You can often squeeze out a few more kb of savings per image if you go into the image settings and reduce to 32 colors. Download the compressed image (which will have a -min.png suffix).
Uploading your images via File Manager
Tip
The following should be done on live, not test, unless you are testing something specific/dangerous/new
Images should be uploaded to wp-content/uploads/images/CppTutorial/<subfolder>
, where <subfolder> is a subfolder of your choice/creation.
Warning
Do not use the Media function of WordPress.
3) Go to the WP File Manager plugin
4) Navigate to the image root: (/images/CppTutorial/
). Note: On test, this will be (wp-content/uploads/images/CppTutorial/
)
5) Create a subdirectory for your images (Dashboard > Media > Make folder&Settings) or use an appropriate existing one.
6) Upload your images (both full size and -min versions)
Link your images
Tip
By default, the [image] tag will reroute test.learncpp.com image URLs to www.learncpp.com (to avoid having to keep images sync’d on both sites). If you want to override this behavior (for testing purposes), use [image test] instead of [image].
7) Link to your image via [image media src=”<subfolder>/imagename-min.png].
Uploading your images via Media (deprecated, don’t do this)
The following should be done on live, not test, unless you are testing something specific/dangerous/new
Images should be uploaded to wp-content/uploads/images/CppTutorial/<subfolder>, where <subfolder> is a subfolder of your choice/creation.
3) Go to the WP File Manager plugin, and navigate to the image root (wp-content/uploads/images/CppTutorial/
)
3) Create a subdirectory for your images (Dashboard > Media > Make folder&Settings) if necessary.
4) Upload your images (both full size and -min versions) using the “Add New” button of Dashboard > Media. This should upload them to the upload root folder
5) Bulk move them to the folder you created to the subfolder you chose/created.