We currently use another server (well, the same server but different account and domain) to serve images for our website.
It currently works like this:
http://images.example.com?src=imagepath&w=300&h=500&q=75.
This does automatic image resizing based on the w=300
and h=400
that we provide to the URL (pixels).
However, the site is for a car dealership and we don't always want to specify the width. Sometimes we need percentage widths, as the site is responsive, and also, not all images are the same size to begin with, so it leads to distortion if we say all images are 700 wide.
Is it possible to have this kind of image resizing external server but using percentages?
We use Apache, PHP
and the images are accessed via directory names based on criteria in the database for that car, so for example images/ford/focus/AA136YH/image1.jpg
.
TL/DR Question: How can we serve images from external PHP
server with percentage widths instead of specifying fixed width and/or height?