Skip to content

A Sketch plugin that can fill shapes and symbols with random images from Lorem Picsum.

License

Notifications You must be signed in to change notification settings

tristandenyer/sketch-plugin-lorem-picsum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NOTE: Now updated to work with Sketch 52.

Lorem Picsum Sketch Plugin

A Sketch plugin that can fill shapes and symbols with random images from Lorem Picsum site.

Screenshot of Lorem Picsum plugin in Sketch 51

Features

  • Gives you the ability to set a random, placeholder image as the fill of a shape or symbol.
  • Uses David Marby and Nijiko Yonskai's work on Lorem Picsum to generate the images. ⭐
  • It first measures your shape / symbol, them requests a random image of that size.

Installation to Sketch

The Lorem Picsum plugin requires Sketch 50 or above.

  1. Download the latest release of the Lorem Picum Sketch plugin.
  2. Un-zip the download.

❗ I strongly recommend you save all of your current work in Sketch before you install and use any plugin!

  1. Double-click on lorem-picsum.sketchplugin file from download.
  2. Launch Sketch, then open a file (new or existing).
  3. You shoud see Lorem Picsum under Plugins menu.

Got Issues? Bugs? Requests?

This plugin is in its infancy (beta), and relies on a third-party website for images. So, issues may come up. Feel free to let me know here on GitHub

Or, you can email me the old fashioned way.

Thanks and Attribution

This plugin is based on Giles Perry's @perrysmotors Sketch plugin Unsplasher (download from GitHub or download from Sketchpacks). A lot of thanks goes to him for the heavy lifting he did on Unsplasher that made this plugin possible.

As stated above, this uses David Marby and Nijiko Yonskai's work on Lorem Picsum to generate the images. Many thanks to them, as well!

Plugin Development

So, you want to start developing on this plugin? Great! Assuming you are working in terminal, AND have node/npm set up:

  1. Install Sketch Plugin Manager
$ npm install -g skpm
  1. Clone sketch-plugin-lorem-picsum repo
  2. Move into plugin folder
$ cd sketch-plugin-lorem-picsum

Ensure that you have the Sketch app installed on your machine before the next step, otherwise you will get a fatal error.

  1. Install project dependencies
$ npm install

You will likely be notified in the terminal that The Sketch developer mode is not enabled and get asked if you would like to enable it. Hit y and enter (yes, you want to enable it.)

  1. Build the project (this will generate lorem-picsum.sketchplugin in the repo folder you are working out of.)
$ npm run build
  1. Launch Sketch, then open a file (new or existing)
  2. You shoud see Lorem Picsum under Plugins menu. (If not, find the generated lorem-picsum.sketchplugin in your local env and double-click it to install.)

After making changes, you will need to rebuild with $ npm run build. I have found that I also often needed to uninstall, delete and reinstall the plugin in Sketch Plugin Manager (Plugins > Manage Plugins) to see the changes since Sketch caches plugins. Sometimes not. ¯\_(ツ)_/¯

More info on developing Sketch plugins can be found here.

About

A Sketch plugin that can fill shapes and symbols with random images from Lorem Picsum.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published