images from rss feed distorted
- Started
- Last post
- 6 Responses
- BaskerviIle
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:
- BaskerviIle0
what CSS should I be using to crop/scale the images?
- caput580
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.
More?
- caput580
here is an example of an overlay technique for images that are similar in size:
- BaskerviIle0
cheers, thanks for the tips, all a bit new to me
- caput580
You're welcome, I just did this so many times. Drop me a line if you need help.