- Last post
- 6 Responses
I'm working on a blog part of which pulls in rss feeds from other site. In these articles the main image is distorted, I assume because the original image doesn't have dimensions associated with it, so the template I'm using just squashes it in a fixed area.
Any tips on how to reformat the images when they're being pulled from an rss feed?
looks like this:
It depends how you pull the feed, what script or plugin you're using. Mainly you can deal with that using CSS in the display part.
what CSS should I be using to crop/scale the images?
There are several basic things you can do:
1. Don't give an image both width and height, stretching will occur almost certainly. Use one of them and then the image is scaled accordingly. This depends on your layout of course.
2. Create an overlay div and place the image as background, then cropping will occur but you can bring it to a decent display if images from the feed are similar in size.
cheers, thanks for the tips, all a bit new to me
You're welcome, I just did this so many times. Drop me a line if you need help.