FOC: Image flexible size
Ocmod (opencart >= 2.3) with backward compatibility for getting more control at image cropping. Can be used to get image with it’s original size.
Default resize logic built on scaling image by it’s minimal side and putting the result into a fixed size container.
In most cases this behaviour expected and correct, but there are two limitations:
- It’s not possible to output images with their original size
- You cannot control which side must be used for scale
This simple ocmod solve those problems.
Control is very simple:
- To disable resize and output image as is just add 0 (zero) as a prefix in your theme image size settings
- To force scale by width – prefix your height with zero
- To force scale by height – prefix your width
You can safely enable/disable this ocmod, since Opencart translate these sizes in integers, so 0500 become 500 with disabled module.