<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 6 May 2014 16:39, Makailol Charls <span dir="ltr"><<a href="mailto:makailol7@gmail.com" target="_blank">makailol7@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div><div><div>Is it necessary to have an extension to image file to set proper content-type for Nginx? Couldn't web server set the content-type from *file type* ?<br></div></div></div></div></div>
</blockquote></div><br></div><div class="gmail_extra">That would require Nginx to inspect the file contents and make a guess as to what file type it is. I don't know if it could do that.</div><div class="gmail_extra">
<br></div><div class="gmail_extra">You could try just using:</div><div class="gmail_extra"><br></div><div class="gmail_extra">add_header Content-Type image/jpeg;</div><div class="gmail_extra"><br></div><div class="gmail_extra">
And hope that the user's web browser will automatically work out the correct Content-Type, if the image was actually a PNG or something.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Cheers,</div><div class="gmail_extra">
Nicholas Sherlock</div></div>