Skip to content

About

Create and cache thumbnails on the Meteor client

Resources

Stars

2 stars

Watchers

10 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

Repository files navigation

Thumbnails

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.

Usage

Thumbnails can be installed from Atmosphere

Meteor add maxkferg:thumbnails

Thumbnails.pdf(imageTag,url,options)

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

Thumbnails.image(imageTags,url,options)

Pull requests welcome

Thumbnails.webpage(imageTags,url,options)

Pull requests welcome

License

MIT

About

Create and cache thumbnails on the Meteor client

Resources

Stars

2 stars

Watchers

10 watching

Forks

Releases

Packages

Contributors

Languages