ImageService api getServingUrl throws ImageServiceFailureException

74 views
Skip to first unread message

Gowtham Gupta

unread,
Mar 25, 2019, 10:16:59 AM3/25/19
to Google App Engine

I am want to use the ImageService API to get to get obscure/secure URLs to my public objects Google Cloud Storage.  I am saving the blob on storage (successfully), and using the getServingUrl API on the ImageService to get the serving URL.  This call throws ImageServiceFailureException.  Scoured thro' the limited documentation, found no solution. My images are less than 1 MB. Please help if you have encountered this and have solved it.  My code fragment


ImagesService imagesService = ImagesServiceFactory.getImagesService();

ServingUrlOptions options = ServingUrlOptions.Builder.withGoogleStorageFileName( "/gs/" + envBucket + "/"

+ PROJECT_PREFIX + "/" + projectUuid + "/floorplanmodel/image" + imagenumber).secureUrl(true); 

url = imagesService.getServingUrl(options); 

Nicolas (Google Cloud Platform Support)

unread,
Apr 8, 2019, 3:48:21 PM4/8/19
to Google App Engine

Hi ,


As your issue seems to be a specific technical issue you would have better assistance from the community by posting in StackOverflow as Google Groups is intended for general discussion. You should post to StackOverflow with the extra log information to have the developer community assist you.


That being said, there is typically 3 reasons why you would get that error message.


1. Unsupported Image Format


Currently, the images service only accept image data in JPEG, PNG, WEBP, GIF (including animated GIF), BMP, TIFF and ICO format [1,4].


Please verify whether your images are in one of the supported formats.


2. Image Too Large


The Images Service imposes some limits on the image size [5], in terms of bytes but also by pixels.


Please verify whether your images exceed these limits.


3. Use the Image Blob Immediately After Creating It


It seems there is a small replication delay for the blob that can cause some issues [2].


Please verify whether pausing for a few seconds after creating the image blob can solve this issue.



[1] https://issuetracker.google.com/37495057

[2] https://issuetracker.google.com/35894451

[3] https://issuetracker.google.com/35893334

[4] https://cloud.google.com/appengine/docs/standard/python/images/#image-formats

[5] https://cloud.google.com/appengine/docs/standard/python/images/#quotas-limits-pricing


Reply all
Reply to author
Forward
0 new messages