Stay organized with collections
Save and categorize content based on your preferences.
The App Engine API for Cloud Storage Tools provides convenience methods
for serving image files:
CloudStorageTools.getImageServingUrl()
CloudStorageTools.deleteImageServingUrl()
One advantage of using this method to serve images over simply
making the files public is
the ability to resize and crop dynamically, without needing to store the
images in different sizes.
CloudStorageTools::getImageServingUrl
returns a serving URL for an image. If the image will be displayed within an
HTTPS page, set secure_url to True to avoid mixed-content warnings.
Notice that this URL is publicly readable by everyone, but it is not "guessable".
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-05 UTC."],[[["The App Engine API offers `CloudStorageTools.getImageServingUrl()` to generate URLs for serving images stored in Cloud Storage, and `CloudStorageTools.deleteImageServingUrl()` to stop serving them."],["Using `getImageServingUrl` allows for dynamic resizing and cropping of images without needing to store multiple image sizes, offering a significant advantage over directly making files public."],["Only the first app that calls `getImageServingUrl` can serve a specific image; subsequent apps must copy the image first if they need to serve it."],["Setting `secure_url` to `True` when using `getImageServingUrl` ensures the image can be displayed on HTTPS pages without mixed-content warnings."],["To remove the actual file you must use the PHP `unlink()` function and not the `deleteImageServingUrl`."]]],[]]