Detailed v
option investigation
How I discovered it
I found out the v
option really unintentionally!
Someday, while I was investigating the image response headers, I found an attribute etag
with value set to v1
. Since I haven't seen any v
option yet, I just tried adding it to the image url and it worked! Despite the header attribute value probably has nothing to do with the v
option, it helped me to accidentally find it.
Investigating how the effect works
First, I've noticed that setting v0
and not setting v
resulted in the same response, which indicates that v0
returns the original image with no v
option (just like using s0
on the s
option would return the original sizing).
Then, I've noticed that setting v1
, v2
, and v3
progressively returned an image with a smaller content size (weight), and visually it became poorer. Interestingly, setting v4
, v5
, etc, didn't continue to optimize it.
Investigating what the effect is
Some other day I tested the same parameters on another image, and found that nothing happened. That was interesting: an option that works for an image and doesn't work for another, so I started testing what was the difference between the images. Reviewing the list of parameters, it came to me that it could be the image type, and indeed it was! The first image type I've tried the v
option was JPEG, and the second was PNG. So, I could reproduce the same effect by setting the second one with both rj
and v3
!
Hence, I searched internet about JPEG types, and interestingly I've found some sources (as you can see here, and here) explaining about 3 types of JPEG: Baseline Standard, Baseline Optimized, and Progressive, perfectly fitting the three variations available within the v
options!
Investigating when the effect works
I went trying the same v
option on other image types, and found that WebP also supported the same kind of customized type, also progressively optimizing the image in weight and quality (but much lesser in quality than JPEG) in the same range between v0
and v3
. Unfortunately, I haven't yet found any sources of different WebP types.
Also, it didn't change anything when used on GIFs, but, as the PNG type, you can also combine its options with rj
and v3
, but you would (of course) lose the GIF animation and quality.