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.

Go 1.16 is now generally available.

Package (v2.0.1)

Package image provides image services.


func DeleteServingURL

func DeleteServingURL(c context.Context, key appengine.BlobKey) error

DeleteServingURL deletes the serving URL for an image.

func ServingURL

func ServingURL(c context.Context, key appengine.BlobKey, opts *ServingURLOptions) (*url.URL, error)

ServingURL returns a URL that will serve an image from Blobstore.


type ServingURLOptions struct {
	Secure bool // whether the URL should use HTTPS

	// Size must be between zero and 1600.
	// If Size is non-zero, a resized version of the image is served,
	// and Size is the served image's longest dimension. The aspect ratio is preserved.
	// If Crop is true the image is cropped from the center instead of being resized.
	Size int
	Crop bool