Here's my situation, I'm doing some basic Sinatra application hosted on heroku. The app is requesting the 25 top most popular videos on youtube by youtube RESTful api, but it only shows thumbnail images on the app not the videos (user has to click it to see the video). Also, the app is requesting my 10 most recent photos from my flickr account by flickraw gem, also show that on the app. When I run google chrome pagespeed to test the performance, I get 56/100. It suggests me that I should serve scaled images rather than reduce it by css or html (I got the smallest images I could get but I somehow need to reduce them down a bit to fit my page), which obviously I cannot do that, those files are on youtube and flickr.
Should I scale them down on the fly and cache that on Amazon S3? or what would be the best strategies to boost my pagespeed?
Right now it takes about 8 seconds to load the entire page.
The most important factor is how often do you request YouTube and Flickr. You should make the request at a given time interval and cache the result / store it in memory.