the answer for all question about Oxygen Builder plugin and WordPress

Just wanted to share this and see what comments it attracts…

Just wanted to share this and see what comments it attracts…

My site serves LOTS of images so i was keen to find a solution to responsive image serving and optimisation. To make matters a little more complicated I am also using FacetWP for filtering which, as an ajax based system, was causing some services to fail.

Anyway it turns out ShortPixel Adaptive Images works great and now all the images on the site are served in modern formats, resized to fit and optimised. Great.

No more messing around with custom images sizes.

Next step was to remove all the existing ‘custom and wp sized’ images from the Uploads folder so I installed the ShortPixel reGenerate Thumbnails Advanced plugin and used it to delete all of these. Great. DB size now relatively tiny.

Last job was to stop WP from creating these images sizes for new image uploads. I only want the original image saved, nothing else.

So I added this code borrowed from the webs…

// Remove default WC image sizes
function remove_wc_image_sizes() {
remove_image_size( ‘woocommerce_thumbnail’ );
remove_image_size( ‘woocommerce_single’ );
remove_image_size( ‘woocommerce_gallery_thumbnail’ );
remove_image_size( ‘shop_catalog’ );
remove_image_size( ‘shop_single’ );
remove_image_size( ‘shop_thumbnail’ );
add_action(‘init’, ‘remove_wc_image_sizes’);

add_filter(‘intermediate_image_sizes’, function($sizes) {
return array_diff($sizes, [‘medium_large’]);

This removes all the Woo sizes plus the particular medium_large size that WP creates. In addition to this I have set the 3 sizes in settings > media to 0/0

Job done. Small DB. Fast images. Easier site building.

What do you all think?


Leave A Reply

Your email address will not be published.

Oxyrealm Docs