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.
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,
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 samesharp
dependency, adjusted and tested to match the expected behavior,