EDIT: Fixed this now. Problem is outlined in my last comment.

Hi,

I'm using the ImageBrowser module and FCKEditor. When I upload an image and place it in my page as a thumbnail, preview or original, everything works ok and I can see the image in all browsers when displayed within an IMG tag. However, if I link it to the original, when viewing the linked image directly in the browser I just get binary data. ie: �����JFIF��H�H����sExif��

This occurs if i navigate to any image directly using the Dynamic URL created by ImageBrowser. I've tested on IE7 and it doesn't happen. It does on FF2 and Flock on Linux and Windows.

Here's an example: http://docs.doculicious.com/imagebrowser/view/image/85/_original

And the link from the blog: http://docs.doculicious.com/blog/about-doculicious.

I used cUrl to look at the headers of the request, and the content-type is coming back as text/html, not image/png

Has anyone seen this before or knows what could be wrong? I guess if I change ImageBrowser to use static images it would fix it, but I'd have to go through all my content and change the nodes.

Cheers,
Chris.

Comments

mm167’s picture

are the following code lines generated by the module? or coded by yourself?

<a href="/imagebrowser/view/image/85/_original"><img width="240" height="172" alt="Doculicious-workshop.jpg" src="/imagebrowser/view/image/85/preview_320" />
</a>

if they are coded by you, then what u want a user to see, if the user click the thumb?

A page just showing the original image without the drupal header/siderbar?

if they are generated by the module, then it looks like a b..u ..g.

carpo’s picture

Thanks for taking a look, i really appreciate your help. Those lines are generated by the module. When the user clicks the thumb, they should see the full sized image.

I've just commented on this below, as I found the cause within the includes/file.inc function file_transfer, where it was not setting the headers passed through to this function. IE must guess the image type, whereas FF must use the mimetype and then fails when one is not sent through.

mm167’s picture

hi carpo,

I believed u have got a work around but not the right solution.

after u fixed your web page, now, when I click the thumbnail, I get see the full image. But the image is on a new non-drupal page. All the drupal header / siderbars are gone.

if u compare the demo of Image Browser,
http://demo.coredesigns.co.uk/
when u click a thumbnail, u will not leave the drupal site.

any way..u have got a work around.

good day.

carpo’s picture

Ahh ... I see what you mean. That's a better solution to link to the image node instead of the image directly. It seems that the ImageBrowser version I have does not do this the same as the example on the page you linked too. Ah well, I can do it manually if needed.

Thanks again for your help :)

carpo’s picture

I was just tracking back through the code and it seems that the header code is commented out within the file_transfer function in includes/file.inc, thus the correct header is not set. If I enable the code, it all works fine. I'm not sure why this is commented out.