1

When using get_serving_url(user.photoBlobKey) to return an image URL from the GAE Blobstore, the Google Images API returns a JPEG image with quality = 70 and size = 512px as default.

Is there any way to increase the default JPEG quality returned by get_serving_url()?

Lipis
  • 21,388
  • 20
  • 94
  • 121
Ajax
  • 1,418
  • 2
  • 17
  • 38

3 Answers3

2

There's an undocumented URL parameter l, you can add it to the end of the image URL like so: =l100 (or =s640-l70 if you have another param before it) that should modify the output quality of the JPEG. Seems to be =l1 to =l100.

See also: List of all the App Engine images service get_serving_url() URI options

Community
  • 1
  • 1
Taylor Hughes
  • 1,963
  • 2
  • 15
  • 14
1

No there is not.

If you think it's a useful feature you can add an item to the issue tracker, from there the team will assess the demand for implementing it.

Lipis
  • 21,388
  • 20
  • 94
  • 121
Stuart Langley
  • 7,044
  • 1
  • 20
  • 20
-1

you can't control the output quality but by requesting

get_serving_url(user.photoBlobKey, size=0)

you will get the original size of the image up to 1600px height and width.

the returned url will be automatically postfixed with =s0 which you could add also before rendering the image in the template for example.

aschmid00
  • 7,038
  • 2
  • 47
  • 66