Notice: Over the next few months, we're reorganizing the App Engine documentation site to make it easier to find content and better align with the rest of Google Cloud products. The same content will be available, but the navigation will now match the rest of the Cloud products.

Python 3.10 is now generally available.

google.appengine.api.images.get_serving_url_async

Asynchronously obtains a URL that will serve the underlying image.

This URL is served by a high-performance dynamic image serving infrastructure. This URL format also allows dynamic resizing and cropping with certain restrictions. To dynamically resize and crop, specify size and crop arguments, or simply append options to the end of the default URL obtained via this call.

Example::

get_serving_url -> "http://lh3.ggpht.com/SomeCharactersGoesHere"

To get a 32-pixel-sized version (aspect-ratio preserved), append =s32 to the URL::

http://lh3.ggpht.com/SomeCharactersGoesHere=s32

To get a 32-pixel cropped version, append =s32-c::

http://lh3.ggpht.com/SomeCharactersGoesHere=s32-c

Available sizes are any integer in the range [0, 1600] and is available as IMG_SERVING_SIZES_LIMIT.

blob_key The BlobKey, BlobInfo, string, or Unicode representation of the BlobKey of blob whose URL you require.
size Integer of the size of resulting images.
crop Boolean value. True requests a cropped image, while False requests a resized image.
secure_url Boolean value. True requests a https URL, while False requests a http URL.
filename The file name of a Google Storage object whose URL you require.
rpc Optional UserRPC object.

A UserRPC whose result will be a string that is the serving URL.

BlobKeyRequiredError If a blob key was not specified in the constructor.
UnsupportedSizeError If you specified an invalid size parameter.
BadRequestError If crop and size are present in the wrong combination, or if blob_key and filename are both specified.
TypeError If secure_url is not a boolean type.
AccessDeniedError If blob_key refers to a Google Storage object and the application does not have permission to access the object.