Quote Originally Posted by davewest View Post
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.
Re: Option 1, request a new feature enhancement to colorbox or fork it and do it ourself!
I assume you mean forking the Colobox library?? Is the author of it adverse to accepting PRs?? Because if he isn't you could submit a PT and see if he accepts it into the codebase

Re: Option 2, rewrite the function in zen_colorbox.php
I know Daniel has been absent, but I do know he checks in to the Zen Colorbox repo.. The only issue at this point is that his master repo is out of step with the version available in the downloads because he's got the (yet unfinished) code to try and add the lightbox effect to all of the Zen Cart popups.. My fork of his repo matches what's in the downloads.. If you wanna fork my fork, and make the change, I'll re-submit the module (unless you wanna )