Image optimizations for embedded topics

Hi everyone,
I am embedding a list of topics from my forums on another website.
it works great, however the images that appear next to each topic are not optimize.

It really slows down the load speed of the page. The image is sized 100px roughly, but still loads the full-quality image from the forums (around 1MB). An optimized version is about 90kb so 10 times smaller.

Is there any way to force the embedded topics to load the optimized version of each image by default?

I look at the embedded js but didn’t see any line with regards to images.


Is there a way to actually make this js load an optimized image?
The images on my embed are sized 100px roughly but the large pictures from the community kill the page loading time. Is it not possible to load the optimized 375px version?

There is no way to do this currently.

1 Like

I appreciate the response Robin.

Is there a way to potentially play around with the js to do this?
Otherwise the option I’m thinking of as an alternative is get a list of posts using POST and then creating divs for these topics on my own. Not sure how simple this would be though.

The topics are embedded as an iframe so using javascript is going to be very difficult. You’d have an easier time writing a plugin, or as you mentioned, calling the API directly to do what you want.

I would accept a pull request on core to add an option for smaller image sizes if you are comfortable with ruby.


I’ve moved your other question to this topic to keep things organized.


No problem. Sorry for the duplication.

Thanks. I managed to do that but I’m struggling to find the optimized version of each photo… There must be a fixed link to get the optimized images, right?

Sorry, which approach are you taking?