• Resolved Audiomonk

    (@audiomonk)


    My report number is RABPFFQS

    This problem is driving me crazy and getting nowhere with it.

    I have thousands of images on my website, I used the image optimiser to optimise almost all of them. But I had to disable wp-hide plugin to do that. It was set to the cron method and that part worked.

    I had to stop the cron, because it was trying to optimise when wp-hide was activated again. Those images aren’t optimised and there is no way to send them for optimisation.

    Occasionally I forget the wp-hide problem and manually send for optimisation, and litespeed optimise doesn’t give errors, it just doesn’t optimise the images.

    What drives me crazy is that I can’t tag unoptimised images to send to be optimised. I must have about 100 images now.

    Do I have to undo all the optimisations just to do the missed ones? If I re-do optimisations is it going to affect quality ?

    Would be so much better if there was a button that flagged missed images for sending again until this compatibility problem between the two plugins is fixed. The dev at wp-hide doesn’t understand why it’s not working with litespeed.

    Please, please help!

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Support qtwrk

    (@qtwrk)

    Hi,

    I see you have disabled WP hide , could you please try re-enable it , and post the .htaccess rules it added ?

    I’m thinking maybe it adds some rewrite rule that messes with image optimization as it may rewrite or redirect normal uplaods URI to a different location.

    Send Request in Media page per row is in our to-do list.

    Best regards,

    Thread Starter Audiomonk

    (@audiomonk)

    Hi, thanks for your quick reply, where can I send the .htaccess rules ? Can’t put them here it would compromise security of my site.

    Can’t come soon enough to have send request in media page. Isn’t there possibly some code I could run in the meantime for the unoptimised images to flag that they haven’t been optimised? Litespeed is assuming they have.

    Thread Starter Audiomonk

    (@audiomonk)

    There’s a link here which shows wp-hide .htaccess entries. It basically rewriting to custom areas that you choose, so I can’t post this publicly.

    https://community.bitnami.com/t/configuring-wp-hide-security-enhancer-htaccess/70938

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    from that htaccess content

    RewriteCond %{ENV:REDIRECT_STATUS} ^$
    RewriteCond %{HTTP_COOKIE} !^.*wordpress_logged_in.*$ [NC]
    RewriteRule ^wp-content(.+) /index.php?wph-throw-404 [L]

    so if I am interpreting it correctly :

    if the incoming request doesn’t have REDIRECT_STATUS status , and doesn’t have wordpress_logged_in cookie , then every request to wp-content, like image URL /wp-content/uploads/2020/02/some.jpg will redirect to index.php?wph-throw-404

    I think this is what caused the issue.

    Best regards,

    Thread Starter Audiomonk

    (@audiomonk)

    Sounds very promising, in terms of finding the cause?

    So, how to fix ? I mean images still show if not logged in obviously (when requests are made, and other plugins still work when not logged in and showing images (recent posts widgets etc) , so is it the case that the optimiser doesn’t have redirect status? I’m out of my depth here, just trying to work out how it can be solved?

    • This reply was modified 5 years, 1 month ago by Audiomonk.
    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    02/20/20 12:45:09.969 [128.199.57.119:35328 1 NrW] ?? ------GET HTTP/1.1 /wp-content/uploads/2020/02/123.png
    02/20/20 12:45:09.969 [128.199.57.119:35328 1 NrW] Query String: wph-throw-404
    02/20/20 12:45:09.969 [128.199.57.119:35328 1 NrW] HTTP_REFERER: https://test.domain.com
    02/20/20 12:45:09.969 [128.199.57.119:35328 1 NrW] User Agent: LiteSpeed-Image/2.9.6
    02/20/20 12:45:09.969 [128.199.57.119:35328 1 NrW] Accept: */*
    02/20/20 12:45:09.969 [128.199.57.119:35328 1 NrW] Accept Encoding:

    Yeah , it seems redirect it to 404 page as I assumed.

    a quick workaround , try make that block to be

    RewriteCond %{HTTP_USER_AGENT} !LiteSpeed-Image
    RewriteCond %{ENV:REDIRECT_STATUS} ^$
    RewriteCond %{HTTP_COOKIE} !^.*wordpress_logged_in.*$ [NC]
    RewriteRule ^wp-content(.+) /index.php?wph-throw-404 [L]

    this will add a condition check

    RewriteCond %{HTTP_USER_AGENT} !LiteSpeed-Image

    that if user agent is LiteSpeed-Image, which is our image server uses , will bypass that 404 redirect rule.

    Best regards,

    • This reply was modified 5 years, 1 month ago by qtwrk.
    Thread Starter Audiomonk

    (@audiomonk)

    Thank you !!

    In my .htaccess there were two instances of this, I made changes to both, just tested and it worked, so thank you for solving that problem, very much appreciated. Just have to work out now how to optimise the ones that were missed.

    If I undo all optimisations and restart, it won’t reduce the quality of my pics will it ? I didn’t keep backups of originals, as the litespeed versions were good.

    Thanks again

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    It depends on your images, I just did some quick test on few images, some of them are shrinked again , some of them are pretty much remains same as before.

    So better way for you is to either find the original files , if you have backup , that will be best.

    other way is wait for the new feature to allow optimize in Media page per row.

    Best regards,

    • This reply was modified 5 years, 1 month ago by qtwrk.
    Thread Starter Audiomonk

    (@audiomonk)

    I think I will wait for the optimize in page per row feature, I’ve about 28,000 images of which about 100-150 aren’t optimised. Thanks for all your help qtwrk. I posted your solution on the wp-hide support forum as well. Hopefully they’ll implement it in their next release.

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    I will keep remind our developers from time to time , and hurry them up ??

    Best regards,

    Thread Starter Audiomonk

    (@audiomonk)

    Thank you, I just noticed something strange, I tried optimising a couple as a test with another package, and it said they were already optimised?! But Litespeed image optimisation isn’t showing anything next to them in the media view. So it may be that the optimisation has worked, but the table hasn’t updated?

    Anyway, I won’t try any more, I’ll wait for you to remind them to hurry ??

    Thread Starter Audiomonk

    (@audiomonk)

    Something (I don’t know what) removed the extra entries in the .htaccess file. It was working very well, I’d activated the cron again and it was optimising images as they were added which was great.

    Looked today there were about 6 that weren’t optimised, then found the missing entries in .htaccess ??

    Added them back, but now Litespeed is giving errors.

    When I click “clean up unfinished data” I get this message.

    “Failed to post via WordPress: imgoptm_destroy_unfinished failed on child server [err]”

    If I click Send optimisation request I get

    “Failed to post via WordPress: “Previous requests in optimizing process: 8”

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Images not optimised’ is closed to new replies.