I am building an application that serves images of varying width and height depending on what query parameters are passed.
For example image.jpg?w=150&h=150 would return an image of with a width of 150 and a height of 150.
Is it possible to use user agent request header to serve images depending on the header?
So could I check for a user agent request header and if it was for mobile for example, could I return an optimised image?
How could I achieve conditionally rendering the correct query paremeters to the image src?