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
  • 20,734
  • 19
  • 92
  • 118
Ajax
  • 1,332
  • 1
  • 14
  • 34

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,903
  • 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
  • 20,734
  • 19
  • 92
  • 118
Stuart Langley
  • 7,014
  • 1
  • 19
  • 19
-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
  • 6,938
  • 2
  • 45
  • 66