This is an effort to document what is known about Google's (Blogger's/Blogspot's) image URL parameters. Some of these options were taken from existing first or third party documentation (see the links at the end of this document), but the majority is based off my own investigations.
- On Blogger's image URL's:
2.bp.blogspot.com/-OF7u67HQE1M/VHc8S8qJTDI/AAAAAAAACxI/UD-11c63diQ/
s1600
/005.png
- On just about any googleusercontent image URL:
https://lh3.googleusercontent.com/Jvmz11cLrvNIHG_LWjVO9B-UV2IN4Cfk1pycbhWZl6IriMgCAGCOFuBRtoHaiZ6xeVGqCugZcCql=
w176-h176-n-o
Replace the bolded parts with the parameters.
#
represents numbers; *
is used as a wildcard, meaning anything can follow.
Parameters can be combined by joining the with a hyphen, eg. w200-h100-c
.
param | description |
---|---|
w# | specifies the width. |
h# | specify the height. |
s# | fit the image into a square of specified size. equivalent to setting w and h to the same value. |
nu | No Upscaling of files smaller than requested. |
s | Force the scaling, ignoring the aspect ratio. Requires both w and h to be explicitly set. ignores nu . |
Aspect ratio will be preserved by default. Also, nu
seems to be set by default for resize-only requests. Setting s
, w
or h
to zero returns the full image.
param | description |
---|---|
c | crop the image |
cc | circular mask applied over the crop. see also bc# background color option below. |
ci | does not upscale the image when a larger size is requested, and seems to always return a square crop |
p | crop with a different focus |
pf | same as p ? |
pp | same as p ? |
n | similar to the p crop. requires both w and h to be set. |
fcrop64=1,aaaabbbbccccdddd | free crop. Each block specifies the position of one border (a = left, b = top, c = right, d = bottom). Each hexadecimal value is calculated according to this formula pos = 0xYYYY / 0xFFFF or 0xYYYY = pos * 0xFFFF where 0xYYYY is the hexadecimal value we're looking for and pos is the distance from the top left corner in percent. For instance, fcrop64=1,00008000ffffffff would give you the bottom half of the picture. |
I'm not too sure how c
and p
are different from another. The crop parameters change the "fit into this size" approach from the resizing parameters into "fill this space". Cropping will force a resize even if the image is smaller, unless nu
is used.
param | description |
---|---|
fh | flip horizontally |
fv | flip vertically |
r# | rotate by # degrees (must be one of the following: 90, 180, 270) |
ba# | adds a little symbol to the bottom right corner (stars, a checkmark, etc). valid range: 0 to 11 |
br# | border radius of #px. (can be used without specifying a border.) see also bc# background color option below. |
b# | adds a border of #px width in c# color. Does not play well together with other editing parameters. |
c# | set the color for editing operations that use them (eg. b# ). If not set, falls back to white. Accepts hex input: c0xrrggbb or c0xaarrggbb (defaults to transparent) |
bc# | set the background color for formats that don't support transparency. If not set, falls back to c# , or black. Accepts hex input: bc0xrrggbb or bc0xaarrggbb (defaults to transparent) |
pd | pads the image to the given size using pc# color |
pc | set the background color for padded images. If not set, falls back to c# , or black. Accepts hex input: bc0xrrggbb or bc0xaarrggbb (defaults to transparent) |
fSoften=a,b,c | blurs the image, mixed with the non-blurred image. Parameter a doesn't seem to make any difference, b specifies the blurring amount and c the mix with 0 being all blurred and 100 being the original image |
param | description |
---|---|
rj | forces JPEG output. Does not support transparency. Also see bc# background color above. |
rp | forces PNG output. (Animated PNG not supported.) |
rw | forces WebP output. Does support transparency and animation. |
rwa | forces animated WebP output on animated input. |
rg | forces GIF output. |
rh | forces MP4 output. (Intented for GIF conversion.) Does not support transparency. Also see bc# background color above. |
nw | No WebP. Disables WebP output even if requested with rw . Falls back to the original format. |
h | HTML output. A simple html file with a single image element the image as specified (adds ft parameter). |
g | outputs some weird xml file. see Tiled Images below. |
fg | same as g |
pg | same as g but encoded as protocol buffer |
d | force a download of the file. |
ft | apply lossless compression. Doesn't matter for most cases, as it's automatically applied when the image is processed. |
ng | probably like ft above, just not quite as efficient. |
lo | force lossy conversion. Only really useful for webp output, because webp supports both, lossy and lossless modes, and will default to the lossless one for PNG input, ignoring l# . |
l# | set the quality level for lossy compression formats (jpg, webp). Takes precedence over v# . [it's a lowercase L ] |
v# | also sets the compressions level. # is much more limited, but it seems to automatically apply lo aswell. v0 is the original image quality. v1 equals l60 . v2 equals l40 . v3 and above equal l20 . Only works if an output format is explicitly set. |
Compression settings are ignored on any animated output, except for rwa
output setting.
param | description |
---|---|
no | If the file is a video (on Google Photos), this removes the play button from the thumbnail. |
o | Similar to the above, this will make thumbnails of videos have the play button, overwriting no |
m# | Video playback. Number matches the YouTube video codes, but only few will actually be available. Working most often: 15: Original (only available if it's actually streamable and original files are preserved [disabled photo optimization in Google Photos]. Requires mp4 I believe), 18: 360p MP4, 22: 720p MP4, 36: 180p 3GP, 37: 1080p MP4, 140: AAC audio-only |
dv | download a Google-encoded version of the video |
mm,* | Mostly used to download manifest files for a few streaming technologies. Possible values: mm,dash and mm,hls (note the comma). You can also set any valid video format code using this, see m# regarding those. |
vm | when used with the above, modifies some response headers. Recommended. |
The query parameter title
can also be used in conjunction with any valid m#
value to download the video with specified title, ie.: https://lh3.googleusercontent.com/
[some long hash]
=m18?title=aaaa
would download a 360p copy called aaaa.mp4.
Note that even if I said those m#
codes work most often, that doesn't mean they will always be available! Same goes for mm,*
, especially with hls.
param | description |
---|---|
e# | How long the file may be cached by the browser. Number is max-age in days. |
ip | do not strip meta data |
sm | strip color profiles |
t* | used for some kind of authentication on artsandculture.google.com. Otherwise, anything can follow without making any apparent difference. Can be used if your target url is required to have a valid file extension: t.jpg |
q* | works similar to t* . Don't know it's original purpose. |
param | description |
---|---|
k | disables animations. by default, the first frame is shown. see a# below. |
a# | if the source is an animation (eg. a GIF), select a certain frame instead. Introduces the play button, see no . |
With the g
(or fg
) option you can get an xml file containing tiling information. To use the tiling, special parameters x
, y
and z
can be used. x
and y
specify which tile should be returned. z
specifies how far zoomed out the images are. For x
and y
refer to num_tiles_x
and num_tiles_y
respectively from the xml. z
maps to the index of each pyramid_level
, 0 being the most zoomed out.
These are parameters that exist, but where I have no idea what they do or how to correctly use them.
param | notes |
---|---|
a | |
b | |
r | |
al | |
df | |
gd | |
il | |
iv# | 0 or 1 |
lf | |
md | |
mo | |
mv | |
nc | |
nd | |
ns | |
nt0 | |
pa | |
rwu | likely related to webp compression, but does seemingly nothing |
sg | |
sm | |
fm | gives an image of the default avatar |
cp# | |
pc# | |
sc# | |
vb# |
- https://developers.google.com/photos/library/guides/access-media-items (the only official documentation I could find)
- https://www.amp-blogger.com/2019/10/url-image-parameter-for-custom-blogger.html
- https://sneeit.com/using-blogger-blogspot-image-url-structure-for-cropping-and-resizing/ and its comments