Contributions
Keep Image Proportions
Keep images in their correct proportion regardless of their dimensions.
Expand All / Collapse All
Hello,
I've used to script successfully.
Thanks to whoever created it :)
My database contains records that have an image path in the products table but no supporting image in the Images folder.
When I initially used this script, php was delivering a warning that I was dividing by zero in html_output.php.
I fixed this error by modifying the code you wrote in the following way (see attached).
Thanks again for making this script,
-Mike
Fixed a "stupid" punctuation error! sorry! Thanks to David Phung for alerting me to an error.
This "update" to the previous posting will allow you to turn on and off the setting to constrain proportions or not in admin under Image settings.
No files to replace, just a quick copy paste hack and SQL statement.
This "update" to the previous posting will allow you to turn on and off the setting to constrain proportions or not in admin under Image settings.
No files to replace, just a quick copy paste hack and SQL statement.
This was originally given to me, by Alex Tulkoff, out of a request I had made, for something to keep the images in their correct proportion regardless of their dimensions. I have seen many requests for this now so I'm going ahead and release this as a contribution.
To use this just open the update.php.txt file and follow the directions for text replacement in there.
Note: Contributions are used at own risk.