JonJonJon Posted November 11, 2021 Share Posted November 11, 2021 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
Beyondspace Posted November 11, 2021 Share Posted November 11, 2021 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, Lightbox Studio pluginIf 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
JonJonJon Posted November 11, 2021 Author Share Posted November 11, 2021 @bangank36 yes, to trigger a download. Unfortunately I can't get my site to do that, whether that's through squarespace tools such as buttons etc, or via html Link to comment
JonJonJon Posted November 18, 2021 Author Share Posted November 18, 2021 Hi @bangank36 I was wondering if you had a spare moment to help me with this hopefully very small issue? thank you. Link to comment
JonJonJon Posted December 2, 2021 Author Share Posted December 2, 2021 Hi, is anyone able to help on this problem? It seems like it would be an easy fix and quite a common question. Link to comment
Liina Posted October 13, 2022 Share Posted October 13, 2022 I have been looking for the exact same thing. Such a bummer that there is no answer for this question. Does anyone know how to trigger the download of an image file instead of it opening on a page? It would be highly appreciated! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment