Let's say I want to display uncropped images at 600 pixels wide and 400 pixels high (aspect ratio = 1.5) for the landscape orientation images and at 400 pixels wide and 600 pixels high (ar=.67) for the portrait orientation images. For a cropped image of any other aspect ratio I'd want to display it resized proportionately so that the longest dimension is 600 pixels.
Using PHP, CSS , Javascript in any combination, is there some way to do this on a dynamically generated web page without actually passing the aspect ratio of a given image along with it's file path?
Thanks for any insights.
Using PHP, CSS , Javascript in any combination, is there some way to do this on a dynamically generated web page without actually passing the aspect ratio of a given image along with it's file path?
Thanks for any insights.