• Resolved flashjunkie

    (@flashjunkie)


    Is there a code change that could be made to get this result. We are setting up the plugin and have over 10,000 images and 10,000 PDFs. The PDFs take considerably longer and we would like to focus on images for now. I understand that a code change would be overwritten on updates but I really do need this functionality before I hunt for a different plugin.

    I know the helper works for automated compression but we are trying to compress over 20k files using the bulk optimiser and the PDFs are already optimised when saved so the re-compression is slowing us down hugely.

    Many thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter flashjunkie

    (@flashjunkie)

    Ok so I may have found a temporary solution,

    Comment out this line in inc/functions/attachments.php

    if ( 'image' !== $type ) {
    	//$mimes['pdf'] = 'application/pdf';
    }

    It should be line 25

    I have done this and reloaded the bulk optimiser, I’m now only seeing images in the bulk optimiser details whilst running.

    If an admin from Imagify could confirm that this method is an appropriate solution and one that isn’t going to cause issues that would be great. From my initial testing it seems to be an adequate fix.

    Perhaps we could have a filter to be able to do this without editing the plugin files?

    Many thanks

    Plugin Author WP Media

    (@wp_media)

    Hi @flashjunkie

    You can do it this way as a band aid. It will be overwritten when plugin is updated so make sure to have that in mind.

    This is something we have on our GitHub page and we should work on it at some point in the future. I still can not provide any ETA.

    ?Let me know if you need any further assistance, I am happy to help.

    Best Regards
    Marko

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Code to disable bulk PDF compression’ is closed to new replies.