0

I need to invoke a URL, similar to this, through the following anchor :

<a href="www.someurl.com/idOfDesiderdImage">Click me</a>

if I click that element, or I paste that url into a browser, an image download will start.
Instead (or just after) the download is done, I would like to open/display that image with the default image viewer, (whatever it is).

Is this possible?

Shawn
  • 1,232
  • 1
  • 14
  • 44
  • Do you mean the default image viewer of OS? – Teemu Feb 25 '20 at 11:26
  • What do you mean by `default image viewer`? – amaj Feb 25 '20 at 11:29
  • @George well in truth I'm questioning more on the "how" than on the "if" :D – Antoniohts Feb 25 '20 at 11:30
  • @Teemu yes open/show the downloaded image just like i click on it. – Antoniohts Feb 25 '20 at 11:30
  • This one might be a similar case: https://stackoverflow.com/questions/2408146/href-image-link-download-on-click – amaj Feb 25 '20 at 11:32
  • Does this answer your question? [href image link download on click](https://stackoverflow.com/questions/2408146/href-image-link-download-on-click) – Shawn Feb 25 '20 at 11:43
  • You can’t force the browser to open a third party application. All modern browsers give any control of such behavior fully to the user. – Lennholm Feb 25 '20 at 11:46
  • I suppose the only possible solution is to configure your browser to open the file type in that default program. But you can do this for your own browsers only, you can't configure your users' browser or run an arbitrary exe from a web page. – Teemu Feb 25 '20 at 11:49

1 Answers1

0

You should add a target.

<a href="www.someurl.com/idOfDesiderdImage" target="_blank">Click me</a>
Matt
  • 33,328
  • 25
  • 83
  • 97
  • Umm ... I've Photoshop as a default opener of .jpg, .gif, .png and many more image formats, any browser has ever opened Photoshop yet, no matter how the image was loaded ... This just opens the image in a new tab/window, if it can be shown in a browser. – Teemu Feb 25 '20 at 11:32
  • I've already tried: it open a new tab, download the image and close the tab – Antoniohts Feb 25 '20 at 11:43
  • @Antoniohts This may be a browser setting causing this. I am using Chrome and am able to display the image. – Matt Feb 26 '20 at 19:05