Hi guys,
I recently bought a plugin which converts flat pdf files into a flipbook. Every page of the Pdf file is converted into an image.
The theme generates 17 different sizes for each image (of which about 3 or 4 are generated by WP itself). I would like to disable this function for this particular plugin. I already tried to delete a few lines from function.php:
but then uploading didn’t work anymore at all. So I restored it back to normal.
Is there a way to disable (maybe temporarily) this regenerating of image sizes? (preferably permanent for only this plugin)
Hi mustmedia!
Thank you for using Enfold.
I’m sorry but I don’t think that’s possible unless there is a conditional function from the plugin that we can use. Please contact the plugin developer.
Cheers!
Ismael
Hi Ismael,
Thanks for your reply.
Okay, but can’t we think of some kind of workaround? For example, before upload I remove the lines which generates these different sizes and after finishing converting the pdf to images I put these lines back in place.
Cheers.
Hey!
Try adding this at the very end of your theme / child theme functions.php file:
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 );
Regards,
Josue
Hi Josue,
Hero! This works excellent.
Thank you very much mate!
You are welcome, glad to help :)
Regards,
Josue