Question about media image sizes

Hi,

I’m using a plugin to change/add image sizes and there are additional existing image sizes (not default wordpress) that I think are coming from the theme but not sure. What are those image sizes for?

I want to delete the ones I don’t need and change/add what I need.

Thank you.

Hi There,

Thanks for writing in!

All of these were being used in the theme. In the featured image depending on the site layout whether fullwidth or not. If you want to remove these images sizes, you can insert the following code in your child theme’s functions.php file

// Remove X Image Sizes
// =============================================================================
add_action('wp', 'remove_x_image_sizes');
function remove_x_image_sizes() {
  remove_image_size('post-thumbnails');
  remove_image_size('entry');
  remove_image_size('entry-cropped');
  remove_image_size('entry-fullwidth');
  remove_image_size('entry-cropped-fullwidth');
}
// =============================================================================

Hope this helps.

Thanks

OK got it. Thanks for your help!

You are welcome!

I added the code to the functions.php file in pro-child and nothing’s changed. I still see those image sizes.

Also, what is the image size being used for Essential Grid post cover?

The post images are user submitted and I’m trying to have the post cover image automatically resized and cropped upon submission.

Hi There,

Does the plugin you use have a regenerate thumbnail feature? If not, you can try this plugin and regenerate the thumbnails.

Since your Grid image container is a perfect square, you can use an image size with 1:1 aspect ratio (e.g. 600x600 or 800x800).

Thanks,

Hi,

Sorry, Friech’s answer isn’t really helping me.

These are still my issues:

1)This code didn’t remove the image sizes:

2)My question about Essential Grid was whether any of the image sizes above (that I’m trying to remove) were being used for the cover. I’m trying to limit the amount of images being generated by Wordpress but also don’t want to delete an image size that’s being used and have to add another image size, I’d rather change the existing image size to what I need instead.

Also to answer the question about the thumbnails, my plugin does have the regenerate thumbnail feature and I’ve regenerated the thumbnails. (I’m using Simple Image Sizes)

Sorry if I’m not explaining myself well, this image optimization stuff is confusing.

Hi there,

  1. Please try this one
add_action('init', 'remove_x_image_sizes', 9999999999999 );
function remove_x_image_sizes() {
remove_image_size('post-thumbnails');
remove_image_size('entry');
remove_image_size('entry-cropped');
remove_image_size('entry-fullwidth');
remove_image_size('entry-cropped-fullwidth');
}

It will remove image sizes, but will not remove any existing image.

  1. It’s being used by the theme depending on the feature. If it’s for the featured image with the full-width layout, then it may use entry-fullwidth, and so on. And it’s very important because the size range is intentionally added to cover most of the devices, including retina display. Image sizes and generation doesn’t have direct effect to the site’s performance since it only increases the disk usage. Images are only loaded if called based on size.

You may remove that image sizes if you wish to use unoptimized image sizes.

Thanks!

Thanks for the explanation Rad. That helps a lot.

I think I’ll try other ways to optimize images first and set up W3 Total Cache before I try anything else.

You’re most welcome.
If you need anything else we can help you with, don’t hesitate to open another thread.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.