Re: Zen Colorbox
I've been looking at this issue due to another post that got me thinking... Colorbox (the script) is not very good at sizing an image up to match the box, so using external settings like scalePhotos:true, then setting innerHeight innerWidth or height width only affects the box the image is in. If the image is larger then the box, scalePhotos:true rescales the image down, but not proportionality, no scaling up at all, the code is not there to perform that task. Same as passing LARGE_IMAGE_HEIGHT/LARGE_IMAGE_WIDTH does nothing at all in colorbox. There is no external way to pass photo size to colorbox without rewriting colorbox script itself.
Option 1, request a new feature enhancement to colorbox or fork it and do it ourself!
Option 2, rewrite the function in zen_colorbox.php to resize the image and pass the size to the script by adding two lines of code.
Option 3, upload the correct size image...
I don't like what scalePhotos:true does to the image box, it's not responsive at all and it's possible to have a very large image trying to display on a very small screen!
Sending the photo size to colorbox code keeps it responsive and allows the code to resize the image to the screen... so option 2 is on my todo list!
The problem I had in testing without changing code... setting sizes in photo.height and photo.width without creating it proportionality caused distortions.
Dave
Always forward thinking... Lost my mind!