How To Make A Responsive Image Gallery

Difficulty Rating :
Written byAires DaGraca

For this next tutorial we are going to tackle an issue that literally drove me crazy when I first started using Elementor. I had a client that wanted a responsive image gallery that would look great on all devices.

Sadly Elementor’s Image Gallery widget fell short of my expectations.

But I found a work around that required a little work but satisfied the client so if you are up for it I will walk you through.

My Staging Environment

Theme: Hello

Elementor Version: Pro

Additional Plugins: Custom CSS & JS

Let’s Begin

Here is a preview of what we are going to achieve .

Before we get too far ahead upload all your images and copy and paste the links to your notepad we will need them later at the code portion of this tutorial.

I am a huge fan of jQuery plugins as it saves me money and I don’t have to purchase Elementor extensions for stuff I can build my self. With that being said one of my favorites is called Isotope by Metafizzy. I tend to use a lot of his plugins in my projects and it is well worth the cost for a developer license just to show my support.

The Markup

The markup for this is pretty simple and doesn’t require a whole lot.

You can add as many images as you like just remember that the url for your image goes in both the link url and image url and they need to be the same for each image block.

The Isotope CDN

After you have added you images navigate to Custom CSS & JS > Add Custom HTML so that we can add the Isotope CDN. Give it a name and copy and paste the CDN destination below.

Select footer as the location and update.

The Isotope Script

Now we need to add the script that will initialize the plugin.

Select Add Custom JS give it name and copy and paste this script.

If you view your site in the front end all you will see is that your images are stack in a single column in order to fix that we need to apply some CSS that will control the width of the columns on desktop and mobile.

Apply the CSS below to your customizer.

If you have done everything correctly you should have a responsive gallery that will adjust to the size of screen.

Additionally the Lightbox incorporated in Elementor will allow your images to be viewed in a Lightbox if you have the url for the image in the link url portion of the markup. The down side is that there are no arrows to navigate the images once the light box is open so you have to click away.

The Conflicts

Safari does not like this plugin and sometimes the images will stack on first load and the page will need to be refreshed. Other than that I haven’t found any other conflicts.

I Hope you found this useful. 😀

Was this article helpful?

Awesome, follow us on Twitter or Like us on Facebook

Disclosure: Some of the links above are affiliate links meaning at no additional cost to you, I will earn a commission if you click through and make a purchase.

Leave a Comment

Your email address will not be published. Required fields are marked *

By visiting iHeartElementor.com you accept our use of cookies and agree to our privacy policy.

Hello, would you like to take a survey before you leave.

Your answers will help us provide more and useful content.
Thank you for your time.