I'm experimenting with an adaptive image solution which uses htaccess to redirect image requests to a php file. Depending on the user's device screen width, an appropriately-scaled image will be served. I've attached the php file, showing the "break points" for screen width, in pixels.
To test this, I'm using three devices to load a page with three images of different widths, but I'm not understanding the behavior which is observed.
For an iPhone, images which are 3820px wide and 1910px wide are cached as a 1382px image. An image 955px wide is not cached, but served at its native size.
For an iPad, the 3820px image is cached as a 2764px image. The 1910px and 955px images are served without adjustment.
For a desktop, the result is the same as for the iPhone.
1. What is the purpose of the 992, 768, and 480px break points in the php file, if they were never used?
2. Why would an image which is almost 1000px wide not be scaled down for an iPhone?
3. For the iPad, how could the 3820px image be cached at 2764px, when 2764 is not one of the break points in the php file?
I'd appreciate some education.