Hello,
I'm in a web page that has some images i'd like to save locally. But in this page the <img tags , does not have a direct link, they are like this :
<img class="media-photo" src="blob:https://website.com/b96f881c-1871-441f-a999-33305ead7fbd">
If i try to navigate to "https://website.com/b96f881c-1871-441f-a999-33305ead7fbd", i get a 404 error.
How can i download the image in this case?
Many thanks !
Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
How to save image by of an <img tag
- salvadordf
- Posts: 4563
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: How to save image by of an <img tag
Hi,
Try calling TChromiumCore.StartDownload with the whole URL, including the "blob:" prefix.
Try calling TChromiumCore.StartDownload with the whole URL, including the "blob:" prefix.
-
- Posts: 513
- Joined: Thu Aug 10, 2017 12:40 pm
Re: How to save image by of an <img tag
Hello,
Thanks a lot, it works BUT won't let me specify where i want to download the file, looks like it goes to the 'Downloads' folder, with a random name.
Any way to specify name / location ?
Thanks a lot, it works BUT won't let me specify where i want to download the file, looks like it goes to the 'Downloads' folder, with a random name.
Any way to specify name / location ?

- salvadordf
- Posts: 4563
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: How to save image by of an <img tag
I just added a menu option to download a file in the MiniBrowser demo which calls StartDownload.
I copied the image URL from https://codesandbox.io/p/sandbox/image-blob-example-0igon?file=%2Fsrc%2FApp.js
and then I used the new menu option.
The TChromium.OnBeforeDownload and TChromium.OnDownloadUpdated events were triggered and the save dialog was shown because TChromium.OnBeforeDownload calls callback.cont(TempFullPath, True);
The last boolean parameter tells Chromium to show a dialog.
I copied the image URL from https://codesandbox.io/p/sandbox/image-blob-example-0igon?file=%2Fsrc%2FApp.js
and then I used the new menu option.
The TChromium.OnBeforeDownload and TChromium.OnDownloadUpdated events were triggered and the save dialog was shown because TChromium.OnBeforeDownload calls callback.cont(TempFullPath, True);
The last boolean parameter tells Chromium to show a dialog.
You do not have the required permissions to view the files attached to this post.
-
- Posts: 513
- Joined: Thu Aug 10, 2017 12:40 pm
Re: How to save image by of an <img tag
Thank you very much Salvador, it worked !
As a plus, is there a way to hide these download status msgs ?
https://ibb.co/v55RShB
As a plus, is there a way to hide these download status msgs ?

https://ibb.co/v55RShB
- salvadordf
- Posts: 4563
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: How to save image by of an <img tag
Set TChromiumCore.DownloadBubble to STATE_DISABLED
-
- Posts: 513
- Joined: Thu Aug 10, 2017 12:40 pm
Re: How to save image by of an <img tag
Thank you again ! This project never ceases in surprise me 
