A Framer module to fill layers with random images from Unsplash. Search term can be added to get images from a specific theme.
- Download the
imageFill.coffee
file - Create a Framer project and add the file in
/modules
- At the top of the Framer document write
imageFill = require "imageFill"
-
Install the module as explained in the Installation section
-
Create a layer with the properties you want and make sure to also add a name (if you made your design directly in Framer Studio V90+, the name is set when you add a target ).
-
Write the following line, if you leave the search term empty, the image will be randomly picked.
layer.imageFill("Search term")
-
Then you can choose if you want to keep this image (✔︎) or if you want the module to get a new one (✘)
# Require the module
imageFill = require "imageFill"
# Create a layer
profile = new Layer
backgroundColor: "#ffffff"
name: "profile1"
width: 50
height: 50
x: Align.center
y: Align.center
# Fill the layer with an image of a person
profile.imageFill("person")
framer-imageFill is released under the MIT license.
Images from Unsplash are released under the CC0 license More info here. Giving credit is not mandatory, but always appreciated by the photographers 😉
Twitter: @benjarier