Hello.

I'm trying to display PNG images on one of my pages; one of them displays ok, but not the other.

I uploaded them through the Upload module. They both show in the Attachment list at the bottom of my page. But when I click on their links, one is displayed as an image, while the other is recognized as (TEXT/HTML Image) by Firefox (I didn't try with another browser). The one that displays correctly is called lcs_applications.png, the one that doesn't is lcs_gepi.png.

Any idea why? Thanks!

Comments

WorldFallz’s picture

Have you tried viewing the one that doesn't display correctly in an image viewer?

fdelente’s picture

Yes, they show up correctly in Gimp.

fdelente’s picture

I tried displaying my page in Seamonkey instead of Firefox, and all the images show correctly in Seamonkey...

WorldFallz’s picture

This would lead me to suspect a problem with the png version/features and firefox.

fdelente’s picture

I'd say it's a problem with the MIME type of the document?
Is there a way to force a MIME type for a document in Drupal?

fdelente’s picture

It's really a Drupal problem, or at least the way Firefox interprets the code generated by Drupal:

I can see the images correctly in Firefox if I give their URL in the addressbar: http://mysite.com/myDocuments/image.png works for all my images.

I replaced the ?q=system/files/image.png with the URL (http://mysite.com/myDocuments/image.png) in my Drupal pages and it works in Firefox too. I'd prefer the ?q=system/files syntax though.

WorldFallz’s picture

This is rather strange but difficult to diagnose without further details and/or a link to the page in question.

fdelente’s picture

The page is at http://m.delente.free.fr/?q=node/131 .

If the links to the images are ?q=system/files..., it doesn't display correctly in Firefox but is ok in Opera and Seamonkey. It displays correctly in Firefox too now that I have changed the links to http://m.delente.free.fr/Documents/...

The code I use to display the images is <img style="float:left;padding:0pt 5pt 3pt 5pt" src="?q=system/files/lcs_connexion.png"/> Après être arrivé sur la page d'accueil du LCS, cliquez sur « Connexion » en haut à gauche. for some images, and <img style="float:left;padding:0pt 5pt 3pt 5pt" src="http://m.delente.free.fr/Documents/lcs_applications.png"/> Après vous être identifié, for others.

All images are both in http://m.delente.free.fr/Documents, and http://m.delente.free.fr/sites/default/files.

WorldFallz’s picture

Are you using the public or private file setting?

If the links to the images are ?q=system/files..., it doesn't display correctly in Firefox but is ok in Opera and Seamonkey.

Then it must be something local to your configuration-- from what I can tell, when I view the page with both ff3 and ie7 all the images display fine.

fdelente’s picture

Yes, they do display fine for me too when I use Firefox now that I have used the absolute URLs in my page; I'll change them back to the ?q=system/files addresses, could you tell me if they still display fine? Thanks.

dman’s picture

I see a lot of inline images at http://m.delente.free.fr/?q=node/131 with no broken bits. But some extra whitespace from BRs
Firefox v3.0.10, released April 27, 2009

Images are displaying fine, and coming from (eg)
http://m.delente.free.fr/?q=system/files/lcs_gepi.png
OK.

Are you sure this isn't just your local browser cache?

fdelente’s picture

> I see a lot of inline images at http://m.delente.free.fr/?q=node/131 with no broken bits. But some extra whitespace from BRs

The layout isn't perfected yet :^)

> Images are displaying fine, and coming from (eg) http://m.delente.free.fr/?q=system/files/lcs_gepi.png OK.

The image you give as an example doesn't display for me when I go to http://m.delente.free.fr/?q=node/131, but it displays ok when I go directly to http://m.delente.free.fr/?q=system/files/lcs_gepi.png

> Are you sure this isn't just your local browser cache?

I've tried from several machines, all under linux with Firefox 3. I cleared the cache several times, to be sure, but some images still don't display (and always the same images don't display) when I go to http://m.delente.free.fr/?q=node/131

Thanks for testing by the way.

dman’s picture