Updated 1 year ago
This article will help to understand the mechanism of showing images on a Impreza-based site.
The first thing you should know — every image uploaded into your Media Library will automatically create several thumbnails with smaller sizes (dimensions in pixels), this is a default WordPress mechanism. The number of such thumbnails depends on the original dimensions of an image and your settings. Check the table below.
Predefined Image Sizes #
|Dimensions (px)||Provided by||System name||Changeable?||Used by default in|
|1024 x 1024||WordPress||large||In "Settings > Media"||— Post Image of new Grid Layout
— Meta tag "og:image"
|300 x 300||WordPress||medium||In "Settings > Media"||— Preloader Screen custom image|
|150 x 150 (cropped)||WordPress||thumbnail||In "Settings > Media"||
— Image Slider "Thumbs" additional navigation
|600 x 600 (cropped)||WooCommerce (if installed)||shop_single||In "Appearance > Customize > WooCommerce > Products Images"||— Main Product image on Product pages|
|300 x 300 (cropped)||WooCommerce (if installed)||shop_catalog||In "Appearance > Customize > WooCommerce > Products Images"||— All Product lists (Shop and Category pages, Cross-sell and Up-sell blocks)|
- (cropped) means that the thumbnail will be cropped to exact width and height ignoring proportions of an original image
- if two or more Images Sizes have equal values, then only one thumbnail will be generated
Regarding the table above when you upload a large image (bigger than 1024px), it generates 5 thumbnails (7 thumbnails if you're using WooCommerce) by default. All thumbnails are located in /wp-content/uploads/ folder of your WordPress installation, also thumbnails have a suffix in their file name, which means dimensions in pixels:
Adding new Image Sizes #
To add custom Image Sizes go to Theme Options > Image Sizes:
You can set any amount of additional image sizes. After adding new sizes or changing the existing ones you should regenerate your thumbnails.
We don't recommend setting many Image Sizes because of every Image Size:
- increases uploading time, when you add images into Media Library
- creates additional files in your upload directory regarding the number of your uploaded images. For example, if you upload 100 images into your website, you will have 600 files summary by default, and every additional Image Size will add 100 files after regenerating thumbnails.
Regenerating Thumbnails #
When you change any values of existing Image Sizes or add new ones, you should regenerate thumbnails of your uploaded images.
Regenerating is available via plugins only, go to WordPress repository to find one: https://wordpress.org/plugins/search/regenerate+thumbnails/
Applying Image Sizes #
In most cases theme elements are using the most suitable image sizes, which predefined by Impreza code, check the "Predefined Image Sizes" table for more information. But in case of better managing of your website page loading speed we implement the ability to select Image Sizes for the following elements:
- Image Slider
- Interactive Banner
- Image via "Add Media" button in the Text editor
- Gallery via "Add Media" button in the Text editor