RyanVice
Member
Posted 2 years ago #
Hi,
My site, http://www.RyanVice.net (using default skin), at home (IE 6 and firefox not sure version) looks great and images are squished when too wide but aspect ratio of image is maintained but at work (IE 7 and firefox 3.0.14) the images aspect ratio get squished like below
screen shot
Anyone know how to make this so that my images aspect ratio is always maintained?
Thanks
Unless otherwise specified, the maximum width of an image displayed on a WordPress page/post is 500px. If you need to display images larger than this (eg 800px wide), try adding:
$GLOBALS['content_width'] = 800;
to the top of your theme's functions.php file immediately after the opening <?php tag.
your images are squashed by the 'max-width' in style.css:
p img {
padding: 0;
max-width: 100%;
}
if you delete that line, you image should show full width.
(NB: IE6 does not understand the max-width style and ignores it)
RyanVice
Member
Posted 2 years ago #
But how can I get the images to scale down to 500px and maintain the aspect ratio? This is the behaivor I get on IE 6 while other browsers are squishing the image without maintaing the aspect ratio.
under 'admin' > 'settings' > 'media' - you can set the max.image sizes; set the mediumm size to the dimension you need, i.e. 500px wide, and the select medium image size when inserting the image.
good luck ;-)
RyanVice
Member
Posted 2 years ago #
That didn't fix the problem with the aspect ratio being squished.
I'm having a really hard time communicating what i need for some reason, my apologies.
I want the aspect ratio of my images maintained when the scaled down. That's the problem I'm having, the aspect ratio isn't being maintained.
Hey... hopefully someone will see this. I know this is an old post.
Was this ever resolved? I am having the same issue with WP not maintaining aspect ratio on images it's scaling (that were imported from another WP blog).
@andreabfs
could be a css thing of the theme, similar to the one mentioned above.
please post a link to your site and we will see ...