Return image without file extension in browser
up vote
-2
down vote
favorite
How can I 'return' to the browser an image without the file extension, something like google and unsplash does.
Example 01: https://picsum.photos/500/500
Example 02: https://tpc.googlesyndication.com/simgad/3353990143875665780
javascript php image url browser
add a comment |
up vote
-2
down vote
favorite
How can I 'return' to the browser an image without the file extension, something like google and unsplash does.
Example 01: https://picsum.photos/500/500
Example 02: https://tpc.googlesyndication.com/simgad/3353990143875665780
javascript php image url browser
add a comment |
up vote
-2
down vote
favorite
up vote
-2
down vote
favorite
How can I 'return' to the browser an image without the file extension, something like google and unsplash does.
Example 01: https://picsum.photos/500/500
Example 02: https://tpc.googlesyndication.com/simgad/3353990143875665780
javascript php image url browser
How can I 'return' to the browser an image without the file extension, something like google and unsplash does.
Example 01: https://picsum.photos/500/500
Example 02: https://tpc.googlesyndication.com/simgad/3353990143875665780
javascript php image url browser
javascript php image url browser
asked Nov 12 at 21:23
bfaria
437
437
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
You need to set the Content-type response header to that of an image (e.g. image/png) and then the response body to the content of the image.
Thank you. It worked.
– bfaria
Nov 12 at 21:34
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
You need to set the Content-type response header to that of an image (e.g. image/png) and then the response body to the content of the image.
Thank you. It worked.
– bfaria
Nov 12 at 21:34
add a comment |
up vote
1
down vote
accepted
You need to set the Content-type response header to that of an image (e.g. image/png) and then the response body to the content of the image.
Thank you. It worked.
– bfaria
Nov 12 at 21:34
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
You need to set the Content-type response header to that of an image (e.g. image/png) and then the response body to the content of the image.
You need to set the Content-type response header to that of an image (e.g. image/png) and then the response body to the content of the image.
answered Nov 12 at 21:26
Pehota
613
613
Thank you. It worked.
– bfaria
Nov 12 at 21:34
add a comment |
Thank you. It worked.
– bfaria
Nov 12 at 21:34
Thank you. It worked.
– bfaria
Nov 12 at 21:34
Thank you. It worked.
– bfaria
Nov 12 at 21:34
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53270318%2freturn-image-without-file-extension-in-browser%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown