geonode
geonode copied to clipboard
Review the thumbnail scaling process
Expected Behavior
The system should downscale images once.
Increasing THUMBNAIL_GENERATOR_DEFAULT_SIZE to 480x400(doubling the current default). This should be enough to avoid the blurring effect when the client scales the card in the responsive layout.
Actual Behavior
The system is downscaling the image to a fixed size of (200, 100), and afterward, rescales it again to the THUMBNAIL_GENERATOR_DEFAULT_SIZE
Steps to Reproduce the Problem
- Upload a document
- Notice that the thumbnail generated is blurred
Specifications
- GeoNode version: master, 4.x
- Installation method (manual, GeoNode Docker, SPCGeoNode Docker):
- Platform:
Additional details:
Avoid calling generate_thumbnail_content inside the create_document_thumbnail task. Here we are downscaling the image to a fixed size of (200, 100), and afterward we rescale it again to the THUMBNAIL_GENERATOR_DEFAULT_SIZE here. It ends up doing a useless job and creating a blurred thumbnail.