Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add headers to the request url in <img> src?

Tags:

html

http

Example:

<img src='https://example.com/getImage?q=img_ref' />

And the https://example.com/getImage requires us to send some specified headers to make the request valid. Is it possible, or do I have to use ajax for this?

like image 428
Sherzod Avatar asked May 07 '13 19:05

Sherzod


People also ask

How do I add a header to an image?

Go to Insert > Header or Footer > Blank. Double-click Type here in the header or footer area. Select Picture from File, choose your picture, and select Insert to add the picture.

What attribute is used to add an image URL?

The src attribute contains a path pointing to the image you want to embed in the page, which can be a relative or absolute URL, in the same way as href attribute values in <a> elements.

What does the IMG tag with src do?

The <img> tag creates a holding space for the referenced image. The <img> tag has two required attributes: src - Specifies the path to the image. alt - Specifies an alternate text for the image, if the image for some reason cannot be displayed.


1 Answers

That facility isn't available through HTML. I would make it as an ajax request.

like image 104
Daniel A. White Avatar answered Sep 18 '22 19:09

Daniel A. White