[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!