info@martej.com
One-Stop Developer Agency

Download image on click without coding

Last update: 14/05/2023

In this short tutorial we will create an image, that users can download when they click on it. We will only use Bricks Builder native elements and we will do it without coding.

Elements

We will only need div element and image element. Wrap an image element in div, like I did on the screenshot below and that’s it.

Element structure

Image element

Let’s first focus on image element. It’s very simple, you don’t need to set anything else then the image. Of course, you can set all other properties (size, hover state…) and it will work.

Div element

Here we need to do two things:

  1. We need to set HTML tag to a [link]
  2. We need to link it to the Image we want to download. Should be the same as in the “image” element.
  3. We need to add new attribute with the name of download and the value should be the the name that user will see when they will download it. In my case, it’s myImage.jpg.
HTML tag and link to image
Download attribute

Testing

Let’s test it. If the user click on the image in the browser, the image should download. That’s it 🙂

Downloaded image

Leave the first comment