When installing views or Blocks it register new images sizes I'm not using and they're using a lot of space in the server.
How do I prevent views or blocks not creating them.
Thanks
Hi,
Thank you for contacting us and I'd be happy to assist.
I've performed some tests on my website but couldn't see any image sizes which were registered by Toolset plugins.
Note: "Add resized images to the media library" was unchecked on my website at WP Admin -> Toolset -> Settings -> Custom Content.
Can you please make sure that no other plugin or the active theme is registering the extra custom images sizes?
Also please note that by default WordPress itself registers multiple image sizes, as explained in this guide:
hidden link
Please let me know if you still see the extra image sizes in your uploads, even only when Toolset plugins and a default theme like
Twenty Twenty is active.
regards,
Waqar
Hi Waqar. I've test it. And it only happens when I install Views or Blocks. When I deactivate them the new sizes doesn't appear when I upload images.
The option Add resized images to the media library was unchecked.
I tested with twenty twelve theme and without any other plugin and it stills working bad.
Thank you for sharing the update.
Can you please share a clone/snapshot of your website?
( ref: https://toolset.com/faq/provide-supporters-copy-site/ )
This will allow me to troubleshoot this on my own server, without affecting your original website.
Note: I've set your next reply as private.
regards,
Waqar
Thank you for sharing the admin access.
These two image sizes ( 1536x1536 and 2048x2048 ) were introduced in WordPress 5.3, for handling very large image sizes:
https://make.wordpress.org/core/2019/10/09/introducing-handling-of-big-images-in-wordpress-5-3/
You'll see them even with all plugins disabled and with any default WordPress theme.
In the same article, you'll find that a filter "big_image_size_threshold" is available to disable these sizes, but apparently, it doesn't work and is already reported as a bug:
https://core.trac.wordpress.org/ticket/49161
Until that gets fixed, a workaround can be to remove these image sizes, using the "remove_image_size" function.
( ref: https://developer.wordpress.org/reference/functions/remove_image_size/ )
add_action( 'init', 'custom_remove_large_image_sizes' );
function custom_remove_large_image_sizes() {
remove_image_size( '1536x1536' );
remove_image_size( '2048x2048' );
}
The above code snippet can be included through either Toolset's custom code feature ( ref: https://toolset.com/documentation/adding-custom-code/using-toolset-to-add-custom-code/ ) or through active theme's "functions.php" file.
I hope this helps.
Ok. thanks. I'll try your solution.
The strange thing is that they appear when I activate Views or Blocks. When I desactivate them they dissapear. You can test in the site I gave you access.
You're very welcome.
I checked the registered image sizes, through the "Regenerate Thumbnails" plugin, (with and without the Toolset plugins) but there was no difference.
With Toolset:
hidden link
Without Toolset:
hidden link
Perhaps it was some temporary cache issue when you checked earlier?
Hi Waqar. I can see.
Still when activating views it adds me the big files to the system as attached in the image.
Thanks for writing back.
To thoroughly investigate this strange behavior, I'll need a clone/snapshot of your website.
Do I have your permission to install the "Duplicator" plugin ( ref: https://wordpress.org/plugins/duplicator/ ) on your website and download it directly?
Hi Waqar .
Yes, no problem
Thank you for waiting, while I performed some tests on your website's clone.
I couldn't reproduce the issue and the image thumbnails generated by the WordPress were exactly the same, whether the Toolset Views plugin was activated or not:
Screenshot (without Views): hidden link
Screenshot (with Views): hidden link
To clear this up, I'll recommend performing a simple test with new image upload, instead of looking at the existing ones:
1. Please deactivate the Toolset Views plugin and upload a new image in the WordPress media library. The new image should have at least 2048px height and width.
2. Note the thumbnails that have been generated in the uploads folder and then delete the image permanently from the media library in the admin area.
3. Next, activate the Toolset Views plugin and upload that same image again through the media library.
When you'll compare the image thumbnails generated, with and without Views plugin, you'll see that they're the same.
I hope this clarifies and let me know how it goes.
regards,
Waqar