Exclude image from resizing

I would like to exclude an image from image resizing, is that possible? if this is not possible, I would like to open a feature request.

  • Adam Czajczyk

    Hi Jennai

    I hope you're well today and thank you for your question!

    Currently, you can exclude files "by dimensions" from being optimized but that won't let you exclude specific image from being resized. I've asked our developers if that could be done with some additional code so please keep an eye on this ticket for further information.

    Please note: our developers are dealing with a lot of complex stuff on daily basis so it might take a bit longer for them to respond than it takes us on forum but we'll update you here once we got some feedback from them.

    Best regards,
    Adam

  • Ari

    Hey Jennai

    Hope you are well today!

    I created a gist file for you which allow you to skip specific attachments from getting smushed, you just need to put the attachment ids as comma separated for multiple attachments or just an ID for single one. Please follow the steps:

    === Step 1: Installation ===

    Please download this gist file https://gist.github.com/wpmudev-sls/f07745e142e6dcb3c902838c9e428bfb

    Unzip it and upload the wpsmush-exclude-specific-files.php file to wp-content/mu-plugins folder. if mu-plugins folder already not exist just create it.

    === Step 2: Configuration ===

    Please get the attachment ids, you will get the ids from single media popup page, here's the screenshot:

    Now modify the wpsmush-exclude-specific-files.php file you just uploaded to wp-content/mu-plugins folder, add attachment ids in the $attachment_ids variable.
    screenshot:

    ===

    This worked well in my test site, let me know if that works for you!

    Best Regards,
    Ari

  • Adam Czajczyk

    Hello Jennai

    The good thing is that at least it seems that you were able to successfully exclude some images from smushing, thanks for confirmation!

    As for the "500" issue. I wasn't aware of that yesterday but it turned out (actually just yesterday too) that we might be experiencing some slight issue on our end. It's a big inconsistent and is not on a large scale so I'd say: yes, keep trying. Images that were already optimized, will stay optimized and be skipped. Images that were skipped due to this error - Smush will try to process them next time you run the bulk smushing so "step by step" you should "get there".

    However, our developers and sysadmins (since the optimization engine itself is run on our end) are looking into it now so I believe they should be able to push some update to our API quite soon that will solve the issue. I think there'll be no need to make any changes on your end, at some poitn you'll just notice that it's working fine again.

    Best regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.