-
AuthorPosts
-
March 3, 2016 at 6:27 pm #592772
The enfold template is creating multiple versions/sizes of every image I add to the website. One image has 33 different versions,and accounts for 10MB of data. I have a ton of images and it’s taking up a lot of server space. My site is shutting down due to lack of server space.
Question 1:
Is there a way to control image duplication via the functions.php file?Question 2:
Is there a way to set preferences on image management/duplication in the template?Question 3:
If I delete some of the duplicate images… will the original image display in different views by default – or will the deleted images show as broken links?March 7, 2016 at 3:46 pm #594375Hey cpalichleb52!
Please add following code to Functions.php file in Appearance > Editor
function ava_image_sizes() { remove_image_size('masonry'); remove_image_size('magazine'); remove_image_size('widget'); remove_image_size('featured'); remove_image_size('featured_large'); remove_image_size('extra_large'); remove_image_size('portfolio_small'); remove_image_size('gallery'); remove_image_size('entry_with_sidebar'); remove_image_size('entry_without_sidebar'); remove_image_size('square'); } add_action( 'after_setup_theme', 'ava_image_sizes', 11 );
Best regards,
YigitMarch 17, 2016 at 5:11 pm #599755Yigit,
When the theme is updated, will the modification be erased?March 17, 2016 at 5:17 pm #599775Hey!
Yes, but you can use a child theme to avoid that – http://kriesi.at/documentation/enfold/using-a-child-theme/
Best regards,
YigitMarch 17, 2016 at 9:40 pm #599965If I add your code to the functions.php file, will there be instances where images will not display (like on mobile devices)?
Will there be instances of broken links or will the original image display in all instances?
Last question… Will the code remove existing duplicates or just new images added to the media library?
Thanks!
March 21, 2016 at 3:53 am #600957Hi!
Will there be instances of broken links or will the original image display in all instances?
Yes, that will be the case specially for image element with a specific thumbnail selected. Make sure to select the original size.
Last question… Will the code remove existing duplicates or just new images added to the media library?
It will only prevent new thumbnails from being generated. If you want to remove existing thumbnails, use the following plugin: https://wordpress.org/plugins/force-regenerate-thumbnails/
Regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.