How to download external URL image on button click? - html

So I am working with download button, so I want to download image based on URL of the image. This image is not present on my website/page, I just want to download image based on it's URL. When person click on download button image, image should start download instead of redirecting to the image. I seen some answers, which says href="path/to/img", but I guess in my case I don't have path, I just have image URL. So how it possible to download image based on button click?
JsFiddle: Click Here!
Code:
<a download="https://i.imgur.com/oIzrKK3.gif" href="https://i.imgur.com/oIzrKK3.gif" title="ImageName"><img src='https://i.imgur.com/yeGaCcS.jpg'/></a>

Related

How Do I identify the background image of this site? I am cloning a site for Wordpress

I am cloning https://www.sovereignselfdefense.com per request from the owner. To create a Wordpress site. The site that is currently up is a Kajabi site. I have downloaded all images from the Kajabi site by simply right clicking the site and clicking download. I made the Wordpress theme and the images that did not download (shown with arrows) display fine in the custom wordpress theme.
All images, except these images in the CTA (for example, the gentleman with his arms out) are downloaded.
The client is transferring from Kajabi to Wordpress. I am afraid that the cloned wordpress theme is getting these images from the Kajabi site and, when said site is taken down, that I wouldn't be able to get these images. The Wordpress theme works, and displays these images for now.
I used Google Chrome Inspect Elements to try to find what this image is, and how this image is displaying. I am confused.
I'm requesting some tips on how to identify how the site loads these images in the CTA, so I can download them and link the wordpress theme's html accordingly. If someone could teach me how to identify one image, I believe I will be able to identify the rest of the images. Thank you for helping out.
In the inspect you can see the html code there is style expand it and you can access the background image's URL.I have just highlighted in the images.
They have attached a style block before the parent div of any container which has a background image just expand that style tag and get the image.
Image-1:
Image-2:
Image-3:
Image-1: https://kajabi-storefronts-production.kajabi-cdn.com/kajabi-storefronts-production/themes/2031124/settings_images/tzJ4ad46RcSJinm7qbnO_Edited-image.png
Image-2: https://kajabi-storefronts-production.kajabi-cdn.com/kajabi-storefronts-production/themes/2031124/settings_images/qqHvByszR1iu2rvfEQwg_defending2.jpg
Image-3: https://kajabi-storefronts-production.kajabi-cdn.com/kajabi-storefronts-production/themes/2031124/settings_images/AWzmDDsWTlKOdoWPatUA_SovereignSelfDefenseBrandingPhotography-59.jpg
By clicking the image if you can drag it directly to your desktop that means that image is used by
<img src="">
tag in the code. Either it's used through css.
For your code please check the css file and you will get the image use as "background-image:url()" or you can check through inspect element section by section.
If you are using Google chrome then you can download and install this cool extension.
I'm a Gentleman
Here is the description from that link.
Easily save images with a click, gestures or the extension button.
Save images with one click by using the alt + click hotkey (holding the alt key and clicking the image).
Or save images by dragging them (drag the image slightly on any direction).
Download every image on the page by using the extension button (green button on the top right).
Note: The images are downloaded in the default directory for downloads of Chrome.
Installation Note: After installing, Chrome doesn't add any extensions to the currently opened tabs (so, you have to reload the tabs that were opened before the extension was installed to work it to work on them).
Also, you can inspect the page. below is the step on how to access inspect Element.
Right-click anywhere on the webpage, and at the very bottom of the menu that pops up, you will see "Inspect." Click that.
Click the hamburger menu (the icon with 3 stacked dots) on the far
right of your Google Chrome toolbar, click More Tools, then select
Developer Tools.
Now if you want to find out the image you can simply find it by clicking CTRL+F and type like .png or .jpg any other extension that you want to find.
Here is the example.
You can click right click then click save image as and when you are saving it.under the name you will find the type.
Some websites make it almost impossible to get the image. I remember trying to save a background theme image from the old gmail.
If you find yourself in that situation, open the Developer Tools, go to Network, filter by Images then sort by Size descending, so you get the biggest image to be the first one, then hover over each file to find your image.
You want to sort by the file size, because most of the times, the big background images are the largest in size.
Just checked out your website out..
Image 1
You can find this right below the line where the section id is 1574286919067
Image 2
Similar to the first image, this is under the section 1589827030126
Image 3
Once again, under section 1589828889742
Hopes this helps you out.. Let me know if you want to have anymore queries about the same.
The images itself:
-> Image 1: https://kajabi-storefronts-production.kajabi-cdn.com/kajabi-storefronts-production/themes/2031124/settings_images/tzJ4ad46RcSJinm7qbnO_Edited-image.png
-> Image 2: https://kajabi-storefronts-production.kajabi-cdn.com/kajabi-storefronts-production/themes/2031124/settings_images/qqHvByszR1iu2rvfEQwg_defending2.jpg
-> Image 3: https://kajabi-storefronts-production.kajabi-cdn.com/kajabi-storefronts-production/themes/2031124/settings_images/AWzmDDsWTlKOdoWPatUA_SovereignSelfDefenseBrandingPhotography-59.jpg

How to put an image that is already in-browser into a form

I want to let my users add an image to a form, similar to how they might upload an image from their browser, but I want them to be able to choose an image that is already in the browser on the page that I delivered to them.
Is this possible?
Show a modal that has a gallery of images and let them choose one of them, on clicking save collect the index/unique id of the image and save the form.
Something like this could help you https://stackoverflow.com/a/35543772

If I open up <img> src in a new window, a blank window opens

When I try to open up the source of a small .png, only a black screen is available.
I need to copy these images. How do I go about this?
The Example:
Website
https://www.property24.com/property-values/160-alexander-street/brooklyn/pretoria/gauteng/c3dhjiriz2h3ss3nezycf2iqpbnejigrnvvtx4z2vrsw6wztd2wq
Image
<img src="/ListingReadOnly/GetImage?id=8ab6ea84-83d9-4114-b73e-15edffa72d74" alt="Last sales price of the property">
Thanks in advance!
The path to your image in your example code seems to be a relative path so copying and pasting it (the path) into anther tab wouldn't work. If you're using Chrome try one of these:
Right click on the image and select "Copy Image"
Right click on the image, select "Save image as...", (Image downloads), click the down arrow on the right side of the download and select "Show in Folder", Selected the image in the open explorer and copy it as you would a normal file
Right click on the image, select "Open in new tab", copy it from there
Left click on the image and drag it to your desktop (windows), copy it from there
Let me know if this works.
When I looked up the source of the link that you've provided, I can't find any image of ID: 8ab6ea84-83d9-4114-b73e-15edffa72d74. It probably might be some server side change.
Looking at Alt of the image, I hope, you're looking for the image next to the text: "Last sold price:"
There's no need for you to dig up and find the source. Just right clicking on that image in Chrome gave me an option to open it in new tab. From there you can save it or copy-paste, or whatever.
EDIT: This is the URL of the image I got: https://www.property24.com/ListingReadOnly/GetImage?id=1e82e647-2b26-4dfe-a519-904be5215045
EDIT EDIT: Yes, clicking on the link I gave now also loads a black screen. So, the best way around this is to open the link of the webpage (https://www.property24.com/property-values/160-alexander-street/brooklyn/pretoria/gauteng/c3dhjiriz2h3ss3nezycf2iqpbnejigrnvvtx4z2vrsw6wztd2wq), right click on that image and open it in new tab (or directly sve it) and upload it somewhere else to create its URL.
I hope that helps.
So, let me get things straight. You want to get the map image? if you are using Chrome: You can right click and click "open image in new tab". you then can download the image from there.
Image

html store image for upload on page as data string

I have a form that should upload image and then show jquery cropper to let user crop image. I don't want to make a form submit. Is there a way to store selected in
<input file...
image content? To prevent uploading. So I select image, then crop it and only after then I save cropped image. Is it possible?

Pinterest Widget: Add Any Image on Page Pin It Option

I am using the code generator for the Pin It widget here: http://business.pinterest.com/widget-builder/#
and have selected the "Add any image on page" option. However the widget shows me a blank rectangle when I try to use the button to pin. There are 6+ images on the page, all with a direct URL (including http://). When I read through the documentation here, it says an image must be selected for it to work, but when you select the "add any image on page" option it doesn't ask you to specify an image.
How can I make this work so users can pin any image on the page? Anyone else have this problem? I would expect this option to function similarly to the Pin It Bookmarklet.
Make sure the script tag is located right before the closing body tag, if you include the script in the head tag, you won't get the list of images.
This is noted on the page where you generate the code (http://business.pinterest.com/widget-builder/#do_pin_it_button) but it is easy to miss!