-
AuthorPosts
-
August 4, 2022 at 4:52 pm #1360665
Hi,
I don’t need alle the thumbnails, how can I disable them
a) while uploading and
b) delete existing ones?Beste Regards
TimAugust 4, 2022 at 7:32 pm #1360678First – these are snippets for child-theme functions.php!
to reduce the compression level of calculated images :
/**** abstellen der von Enfold auf 100 gesetzten jpeg Qualität *****/ add_filter("avf_jpeg_quality", "avf_set_quality_mod", 9999, 1); add_filter("avf_wp_editor_set_quality", "avf_set_quality_mod", 9999, 1); function avf_set_quality_mod($quality) { $quality = 55; return $quality;}
A) for WordPress image size formats
// Remove unneeded WP image sizes // Remove default image sizes here. function prefix_remove_default_images( $sizes ) { // do NOT remove small and medium sizes, they are used in backend Media Library! // unset( $sizes['small']); // 150px // unset( $sizes['medium']); // 300px unset( $sizes['large']); // 1024px unset( $sizes['medium_large']); // 768px return $sizes; } add_filter( 'intermediate_image_sizes_advanced', 'prefix_remove_default_images' );
B) for Enfold image size formats
function remove_enfold_image_sizes() { // do NOT remove widget size, is used in backend portfolio items! // remove_image_size('widget'); remove_image_size('square'); remove_image_size('featured'); remove_image_size('featured_large'); remove_image_size('portfolio'); remove_image_size('portfolio_small'); remove_image_size('gallery'); remove_image_size('magazine'); remove_image_size('masonry'); remove_image_size('entry_without_sidebar'); remove_image_size('entry_with_sidebar'); remove_image_size('shop_thumbnail'); remove_image_size('shop_catalog'); remove_image_size('shop_single'); remove_image_size('shop_gallery_thumbnail'); } add_action('init', 'remove_enfold_image_sizes');
After inserting these snippets you had to recalculate thumbnails – use a plugin for that
i prefer: regenerate-thumbnails-advancedAugust 4, 2022 at 8:35 pm #1360704August 5, 2022 at 9:10 am #1360731Hallo guenni07,
thanks, works well!
Best regards,
TimAugust 5, 2022 at 10:42 am #1360751Hi Tim,
Great, I’m glad that you got it working. Please let us know if you should need any further help on the topic, or if we can close it.
Best regards,
RikardAugust 6, 2022 at 5:15 pm #1360924You can close this one.
Thanks.August 6, 2022 at 6:45 pm #1360938Hi,
Thanks for the update, I’ll close this thread for now then. Please open a new thread if you should have any further questions or problems.
Best regards,
Rikard -
AuthorPosts
- The topic ‘How to reduce thumbnails?’ is closed to new replies.