Pankaj Khurana
Pankaj Khurana

Reputation: 3271

Image not displayed in ie and chrome

I have an image tag in which i have given src attribute to http://mydomain/attachment.php?attachmentid=391&thumb=1.

<img width='100' height='75' border='0' src='../attachment.php?attachmentid=$picture[attachmentid]&amp;thumb=1'/>

It displays properly in firefox but when i check in ie & chrome the image is not displayed. I even tried to copy the url & then execute it directly in the browser same thing happened. This thing is happening in wordpress php exec widget.

I am unable to find out the cause for this.

Please help me on this.

Regards,

Pankaj

Upvotes: 0

Views: 986

Answers (1)

Wesley van Opdorp
Wesley van Opdorp

Reputation: 14951

Firefox is more tolerant when it comes to image headers then IE and Chrome. What is propably the case, is that the images displayed by your script do not have the expected headers to let IE/Chrome correctly identify them as real images.

You should toy around a little with headers like:

header('Content-Type: image/gif');

An interesting read perhaps: here.

Upvotes: 1

Related Questions