GeoNode / geonode

GeoNode is an open source platform that facilitates the creation, sharing, and collaborative use of geospatial data.
https://geonode.org/
Other
1.45k stars 1.13k forks source link

Report empty thumbnail in case a thumbnail has not been generated for a resource #9604

Closed giohappy closed 2 years ago

giohappy commented 2 years ago

At the moment the API returns the link to the default empty thumbnail image, in case a real thumbnail wasn't generated for a resource.

We want instead a null value to be returned in that case, and let the client know that no thumbnail image is available for the resource. It will take care of showing a placeholder or a message.

This logic will be implemented for any resource type.

marthamareal commented 2 years ago

@giohappy in scenarios where we have thumbnail_url=null(None), Should we have a Thumbnail link object with url = "", or should we not have the Link object at all?

giohappy commented 2 years ago

@giohappy in scenarios where we have thumbnail_url=null(None), Should we have a Thumbnail link object with url = "", or should we not have the Link object at all?

@marthamareal if you mean the Link entry I'd say it shouldn't exist at all. @DavidQuartz the client only relies on thumbnail_url but not the Link object, right?

image

DavidQuartz commented 2 years ago

@giohappy @marthamareal in this case, the client only relies on the thumbnail_url, so excluding that property is good enough. In addition, you may also exclude a link object for the thumbnail in the list of links.