Jump to content

Is it possible to have a download link that downloads an image instead of opens a page?

Recommended Posts

I would like an image download to start in the background when a button is clicked, as is the norm. Instead squarespace opens a page, requiring an additional right-click step. I can't seem to find how to prevent this.

 

When using a link, you have the option of page, file,  etc. so I don't understand why when choosing a file, it opens a page regardless.

 

I am using a code block, but this seems to be the case whatever method i use, such as buttons, forms etc.

my current html code is:

<a href="/s/DM042_Wallpaper_Phone.jpg" download="jonpxl_wallpaper_DM042_phone" target="_blank" class="button">WALLPAPER</a>

 

Link to comment
  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

2 hours ago, JonJonJon said:

I would like an image download to start in the background when a button is clicked, as is the norm. Instead squarespace opens a page, requiring an additional right-click step. I can't seem to find how to prevent this.

 

When using a link, you have the option of page, file,  etc. so I don't understand why when choosing a file, it opens a page regardless.

 

I am using a code block, but this seems to be the case whatever method i use, such as buttons, forms etc.

my current html code is:

<a href="/s/DM042_Wallpaper_Phone.jpg" download="jonpxl_wallpaper_DM042_phone" target="_blank" class="button">WALLPAPER</a>

 

You mean to trigger download when button click?

Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Keyword Highlighter
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

Link to comment
  • 2 weeks later...
  • 10 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.