Need download option in Ignition Perspective

I have uploaded my folder of image files into ignition using web dev module. And now I want a option in my view to download a particular image. I added download icon and trying to use onClick- function but it is downloading a text file on passing the complete image path which is something like- http://localhost:8088/client/Testing/imagefolder/image1.jpg
So, I need help to achieve this functionality of downloading image on icon click.

You don't need at all. Just use a link or navigation action or whatever to point the user's browser to the path to the WebDev file.

But I want to download the image. How can I do that ?

You can have a click action call with the binary image data and suggested download information, but the browser decides on its own whether to actually do that--it might just display the image anyways.

(If you do use, you don't use the WebDev URL, you just perform the same operations as the WebDev script to obtain the image bytes. That part should be in a project library script.)

He's using a mounted folder (I'm pretty sure), which makes this difficult.
You can emulate the mounted folder option in a Python endpoint, but you have to be aware of file traversal risks.

The basic thing is that you need a content-disposition header added to the response, which is what tells the user agent (web browser) to download the file instead of displaying it. Currently webdev doesn't let you do this for mounted files or folders, so you have to work around that somehow. The easiest, least scripting involved option might be to change from an image folder to a table in your DB so you can easily and safely retrieve images.

Can you please share more details on how it could be done ? How can we get image byte ?