0

I'm using a post thumbnail size and I was wondering if there is a way to setup so wordpress only make the thumbnail size when the image I upload is used as the featured image rather than for every image on the site.

// add Thumbnail option
add_theme_support('post-thumbnails', array('post', 'svg'));
set_post_thumbnail_size(275, 154, true);
  • I am not sure if this is possible as WP creates different sizes of the images on uploading it through the media uploader. Using/not using it as a featured image comes pretty much after that – Maruti Mohanty Nov 25 '13 at 7:26
0

There is such plugin: Dynamic Image Resizer so you could give it a try. But... it's old, not maintained since 2012-04-30 so I'm not sure if it still works.

Normally when you upload an image to a WordPress site, it creates several differently sized versions of the image automatically. Themes can define custom image sizes as well, increasing the amount of images generated on your server.

This plugin changes the way WordPress creates images to make it generate the images only when they are actually used somewhere, on the fly. Images created thusly will be saved in the normal upload directories, for later fast sending by the webserver. The result is that space is saved (since images are only created when needed), and uploading images is much faster (since it's not generating the images on upload anymore).

"Pretty" permalinks must be enabled for this plugin to function.

Note: This plugin does not work on multisite setups, due to the way WordPress handles file serving in such situations (with ms-files.php).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.