Pexels

Search and discover free, hi-res photos & videos that you can use within your application.

External sources: Search for free images

When using an image element, this function allows you to source and display images from Pexel’s free library.

Get data from external API

When configuring a data source, this call allows you to dynamically request multiple images from the Pexels library. You’ll have the flexibility to define the search source from a specific keyword, or even your own favorited Pexel images.

Setup

After installing the Pexels plugin, you’ll be required to add your own API keys to begin sourcing content. You can request your own API key on the Pexels developer portal here.

After generating your API key, copy the value into both the “API key” & “API key - dev field” of your Bubble plugin.

Searching for static images

After configuring your API keys, you can now start searching for Pexel images. When using a single image element, select the ‘search for free images’ option next to the external sources data field.

Form here, type in the keyword you’d like to search for, then select a static image from the library to display.

Searching for dynamic images

When choosing to dynamically display images, select the type of content to be ‘Pexel images’, then configure your data source to ‘get data from an external API’.

Now, you’ll have the option to select from the entire Pexels library, or your own favorited Pexels images.

If you’re searching through Pexels full library, you’ll need to include a search keyword.

This keyword can also be pulled dynamically through things like input forms, data fields, or URL parameters.

In order to display these images within a repeating group, simply add an image element, then select the data source to be the current cells Pexels image’s, URL.

Note: This same process can be used on single image elements. As you’re only displaying one image, you’ll need to use an item operator to identify what specific image you’d like to display.

FAQ

Can I display videos from the Pexels library?

You can display videos through an API call to Pexels rather than through the plugin. Our forum is a great resource for how other builders have accomplished this in the past.

Last updated