Skip to content

Intermediate images

By default, a set of alternate sizes are generated for images that are uploaded to a site’s WordPress media library. These alternate sizes are referred to as “intermediate images”. WordPress Core defines a default array of intermediate image sizes: thumbnailmedium, medium_large, and large. The pixel dimensions for each of these default sizes can be defined in the Settings –> Media screen of the WordPress Admin dashboard.

On a typical WordPress install, intermediate image sizes are generated as separate files (e.g., image-150x150.jpg, image-300x300.jpg).

On the VIP Platform, separate files are not created for intermediate images. Only the original (full) size version of the uploaded file is stored on the VIP File System. The intermediate sizes for an image are dynamically generated at the time of a request (e.g., image.jpg?w=150&h=150&crop=1, image.jpg?w=300&h=300&crop=1), and then cached by the edge cache.

Additional custom intermediate image sizes can be registered for a site with the add_image_size() function in a theme or a plugin.

Limitations

Because of VIP’s custom method for handling intermediate image sizes, some WordPress functions will not work as expected.

Intermediate image sizes in WordPress templates

Functions such as wp_get_attachment_image() or the_post_thumbnail() can be used to output images of a specific registered image size in a WordPress template. For example: the_post_thumbnail( 'medium' );.

These functions will not only output an image at a specific size, but will generate a responsive srcset for the image as well.

Intermediate images in media file imports

When migrating a site to VIP, media files within the /uploads/ directory for import usually include separate intermediate image files. Importing all of these files might be necessary if post and page content in the imported database contain links to any of the individual intermediate files (e.g. /uploads/2022/07/image-150x150.jpg). In that case, importing all of the intermediate files can prevent 404s for images in migrated site content.

If links to separate intermediate files do not exist in site content, the intermediate files can be excluded from the import. This can reduce the overall size of the media that will be migrated by up to 95% and increase the speed of the import.

Last updated: April 07, 2025

Relevant to

  • WordPress