Generate thumbnails for web resources from the Meteor Client. Storing thumbnails on the webserver is inconvenient and in some cases costly. Thumbnails generates thumbnails on the client and caches them in the browser localStorage. Currently, this package only supports the generation of pdf thumbnails.
Thumbnails can be installed from Atmosphere
Meteor add maxkferg:thumbnails
Replace the contents of an image tag with a thumbnail
@imageTag - A html image element
@url - The url to the pdf resource (must support CORS)
@options - Any of the options below:
- cache (Boolean) - Whether to retrieve the image from localStorage
- height - The height of the image in pixels (defaults to 50% of original height)
- width - The width of the image in pixels (defaults to 50% of original width);
- page - The pdf page to extract for thumbnail
Note: the scale of the thumbnail is always preserved, so you can only specify one of height/width
Pull requests welcome
Pull requests welcome
MIT