Creating thumbnail
For creating thumbnail, a microservice "image-service" is now available. This service provides a POST method, expecting two parameters: filename without extension and html content that a developer wants to convert into an image. The final image will be a PNG file.
If the html to image conversion is successful, service will return the URL of the created image. If there is error, it will return the error response.
Displaying thumbnail
On slidewiki-platform, there is a Thumbnail component that can be used to display a thumbnail image. Developers can use this component inside their other components. One should loop over it to show multiple components (see DeckView component for example use). Use CSS for positioning etc. as needed. This component takes urlĀ property as mandatory property. The thumbnail image URL has following URL path:
/{userid}/thumbnails/{filename}.png
Example:
<a href={deckURL + '/slide/' + slide.id} className="ui medium image" tabIndex="-1"> <Thumbnail key={index} url={thumbnailURL + slide.user + '/thumbnails/' + slide.id + '.png'} slideId={slide.id} /> </a>