• Resolved Shah Ahmad Yusof

    (@shahahmadyusof)


    Hi,

    Thank you for the great plugin. A few days ago, I update it to the latest version. And I noticed that now we can optimize images with ShortPixel. I also understand that this is temporary try-all-for-free to see if it will optimize our site further. Unfortunately, I simply can’t get how to make this work.

    I have checked the box and select glossy compression and save the setting. I also purge all caching. Yet it does not optimize any existing images on my Media library or optimize any newly upload images. The size of the images in my Media library remains the same. I also deactivate my current image compression plugin but it still not working. Besides that, I also tried on a new WordPress site with only Jetpack plugin activated yet it still not working. So perhaps I’m missing something here and I hope you can enlighten me.

    Shah

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    Hey Shah;
    The Shortpixel integration in AO does not impact the images in your media-library, but routes requests for your images through Shortpixel’s CDN (If you check your HTML source you should see that the image source is now https://cdn.shortpixel.ai) which automagically fetches and optimizes your images. There’s more info in Shortpixel’s FAQ.

    Hope this clarifies,
    frank

    Thread Starter Shah Ahmad Yusof

    (@shahahmadyusof)

    Hi Frank,

    Thanks for the fast response. I have tried to re-activate the option and I find it is indeed that my image source has been replaced by CDN from ShortPixel. Unfortunately, it makes all my images broken including logo and everything. This is the error I get if I try to open logo image in a new tab.

    Fatal error: Uncaught PDOException: SQLSTATE[08004] [1040] Too many connections in /usr/local/important/web/cdn.shortpixel.ai/lib/db.php:4 Stack trace: #0 /usr/local/important/web/cdn.shortpixel.ai/lib/db.php(4): PDO->__construct('mysql:host=176....', 'user_regular', 'shiftmeme88') #1 /usr/local/important/web/cdn.shortpixel.ai/lib/loader.php(11): include('/usr/local/impo...') #2 /usr/local/important/web/cdn.shortpixel.ai/serve-image.php(6): include('/usr/local/impo...') #3 {main} thrown in /usr/local/important/web/cdn.shortpixel.ai/lib/db.php on line 4

    Shah

    EDIT: This issue only fixed if I disable image optimization option on Autoptimize setting.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    ouch!!! I’ll contact @shortpixel immediately!

    Hi Frank,

    Each time I’m checking in I really need to congratulate you for the fantastic plugin you created. It makes my life easier every day! Since I’m always looking for new opportunities to optimize my site, I decided to give ShortPixel a go after seeing that AO offered the possibility to Optimize images on the fly and serve them from ShortPixel’s CDN (before that I used Smush and EWWW Image Optimizer). I signed up for 65,000 credits (thanks for the free credits by the way), and launched the long image optimization process (took 24 hours to complete).

    However, even though 98% of my images were properly optimized, I later ran into a series of bugs (spoiler alert: I think I identified the source of the problem). I reached out to @shortpixel to tell them about this bug. The description below is just FYI, as I don’t want to take your time + I think I solved this issue (so far). But I thought my user experience could be interesting to you (particularly Bug #2).

    Bug #1: Optimizing pictures on the fly (when uploading them) vs optimizing pictures which have been previously uploaded.

    Over the last two days I optimized the images of my site using ShortPixel’s plugin. It worked smoothly. All the images which were optimized, were images which had been uploaded BEFORE the ShortPixel plugin was installed (this is important). FYI, the “Optimize media on upload” option was ticked then. I excluded the following thumbnail sizes from the resizing process: “thumbnail (150px × 150px)” and “medium (300px × 300px)”. Today, I added various new images to my site for the first time (“Optimize media on upload” still ticked). These images were then optimized on the fly while they were being uploaded. When I published the article with these media, all the thumbnails were broken. I made a backup of my site (backup A), and reverted to an earlier backup from 8 hours ago (backup B). I then reverted to backup A. All thumbnails were back (except for my most recent article). I then deleted all the pictures which had been optimized on the fly for my recent article, deactivated the option “Optimize media on upload”, uploaded the same media again (not optimized), and ran an optimization on this media only once they had been fully uploaded. Now, all the thumbnails are visible (after I cleaned AO’s cache, WP Engine’s cache, and Cloudfare’s cache). I think the problem was caused by the “Optimize media on upload”. Possible reason: the fact that I excluded “thumbnail (150px × 150px)” and “medium (300px × 300px)” from the optimization process.

    Bug #2: “Optimize images on the fly and serve them from a CDN” (in AO’s “Extra Auto-Optimisations”).

    I thought my problem was solved. However, a few hours later, 70% of my thumbnails were broken. After checking the behavior of a page when it loaded (it took forever to load…), I noticed that it was calling resources from ShortPixel’s CDN (https://cdn.shortpixel.ai/). I had this feature enabled in Autoptimize: “Optimize images on the fly and serve them from a CDN” (in “Extra Auto-Optimisations”). After I deactivated the feature and cleaned my AO/WP Engine/Cloudflare cache, everything was back as it was before when everything worked.

    I will keep an eye on how the site behave overnight. I thought this might interest other users who might ran into the same issue.

    à bient?t!

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    my thumbnails were broken. After checking the behavior of a page when it loaded (it took forever to load…)

    might that have been within a couple of hours from when Shah posted about the DB error @nikkoboy? because there was a problem with a Shortpixel server which in the mean time was fixed, so that could explain ..

    Thread Starter Shah Ahmad Yusof

    (@shahahmadyusof)

    @optimizingmatters

    Thank you for the update, Frank. I just checked on my website and confirm this bug has been fixed. Currently, images on my site completely run from Shortpixel CDN. I also checked that my site loads faster and have the size of at least 50% lower compared to original images in my Media library. This is indeed a super awesome feature. And I can’t thank you enough for bringing this feature for us. However, I still have few questions left:

      How long will we able to use this free feature? Any estimated time?
      If this is for trial, is there any plan to make this feature as a premium Autoptimize feature in future?

    P/S: I take that this issue has been resolved. And again Frank, you are awesome. Thanks for this feature.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    thanks for the feedback Shah!

    regarding image optimization and how long you can use it for free; that’s @shortpixel ‘s call, but I guess for a couple of weeks (our launch period). after that it will remain free for a limited number of optimizations, after which you can “top up” your account on shortpixel’s site. I’m not planning on creating a “premium” AO for now.

    have a nice weekend!
    frank

    Hello Frank,

    stepping into this thread, today we encountered the same type of issues.

    Somehow the shortpixel CDN/server looks down. There is no fallback to standard images when the option on the 2nd tab of autoptime is activated, hence many images were missing. Making our site look miserable.

    It took me a few minutes to realize what was causing this. Then turning the option off resolved the issue. Although the shortpixel option looked like a great addition, this type of issue brings back earlier bad CDN experiences… This is the reason why we have stopped using CDN’s completely before.

    Not sure if it is even possible, but it would be a reliability improvement if there would be an automatic fall-back when a CDN is offline.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    there was an issue at shortpixel, which is fixed in the mean time if I’m informed correctly. there is actually a (semi-)automatic fall-back, but that does not happen immediately (it’s based on a cron-based check of a service-status file).

    frank

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘ShortPixel image compression not working’ is closed to new replies.