> For the complete documentation index, see [llms.txt](https://docs.pazly.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pazly.dev/integrations/make-your-image-pop.md).

# Make your image pop

Using this technique you will be able to turn every image on your website into a pop-up for bette visibility. There are 2 things you need to do for this.&#x20;

\
1\. Add `open-modal=true` as a custom image attribute, like in the video below. Add this to **all images** you want to be displayed in a pop-up

{% embed url="<https://www.youtube.com/watch?v=PRoiZk6grRg>" %}

2\. Copy-Paste the code below in the scripts area of your website. This is only doable in Pazly Pro, so you will need a **pro** or **lifetime** subscription for this

```

<div id="modal" class="fixed hidden z-50 inset-0 bg-gray-900 bg-opacity-60 overflow-y-auto h-full w-full px-4">
    <div class="relative w-10/12 md:w-4/6 top-20 mx-auto">
        <img src="" class="w-full h-full object-center object-cover shadow-lg rounded-md " alt="Image Modal">
    </div>
</div>

<script>
// all images inside the image modal content class
const lightboxImages = document.querySelectorAll('img[open-modal="true"]');
console.log(lightboxImages);

const modalElement = element =>
  document.querySelector(`#modal ${element}`);

const body = document.querySelector('body');
// closes modal on clicking anywhere and adds overflow back
document.addEventListener('click', () => {
  body.style.overflow = 'auto';
  modalPopup.style.display = 'none';
});

const modalPopup = document.querySelector('#modal');

// loops over each modal content img and adds click event functionality
lightboxImages.forEach(img => {
  const data = img.dataset;
  img.addEventListener('click', e => {
    body.style.overflow = 'hidden';
    e.stopPropagation();
    modalPopup.style.display = 'block';
    modalElement('img').src = img.src;
  });
});
</script>
```

&#x20;Here is a small demo on how to do this

{% embed url="<https://www.youtube.com/watch?v=FXTo-eCWRds>" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pazly.dev/integrations/make-your-image-pop.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
