[Smush Pro] Get Smushed images

Hey guys,
i have two sites that share a database, one site is purely for feeding data, the other one has a front end function. It`s a bit of an old setup, but i still works.

What i do is i call the DB directly with sql to get the posts and images that belong to the feeding site. So when i need an image i don`t use the wordpress native functions like the_post_thumbnail().

I think this causes the images being served not being smushed, i did smush them. So when i use GTMetrix it states those images aren`t smushed. Is there a way to call the smushed versions of those images?

Could be i’m totally of target with this, but i couldn’t get it more clear form the documentation. Hoop you can help me!

  • Dimitris Kalliris
    • Support Team Lead

    Hello there Peter

    Bulk Smush is optimizing the images located to your server, so no matter how you load these in other domains/applications, they should be the same optimized images.

    To make it more clear, when using Bulk Smush to optimize your images, then each image is getting transferred to our Smush servers where it gets optimized and then it’s being sent back to your server overriding the un-optimized image in the same folder/file. So, in the end, nothing changes in the structure of your files or database (thus no change is required to your theme or anywhere else in order for the optimized images to being served).

    Can you please double-check the Google Pagespeed insights? If it’s about “resizing” images, then it means that you load images that are larger than their container in the frontend so you should re-check which thumbnail versions you use.

    Warm regards,
    Dimitris

  • Peter
    • Design Lord, Child of Thor

    Great, i thought that was the case, but the GTMetrix test said that all images from the other “site” were not smushed. I also found out that my customer uploads really small images and i had smush originals off, so probably when i start resmushing it will all be fixed!

    So thank you very much, have a great weekend!