Ovi / DummyJSON

DummyJSON.com provides different types of REST Endpoints filled with JSON data which you can use in developing the frontend with your favorite framework and library without worrying about writing a backend.
http://dummyjson.com
Other
1.87k stars 202 forks source link

Changed thumbnail background to be transparent #87

Open TomasDurica opened 1 week ago

TomasDurica commented 1 week ago

When resizing images that are not square, sharp library adds black background. This PR addresses this by changing the background to be transparent, in case someone wants to show the thumbnails.

This change was tested in isolation - the code in question generateThumbnailImage was extracted to a separate project with same sharp dependency, adjusted and tested to match the expected behavior,