Image URLs from REST API Don't Always Work in Firefox

o_swaso_swas Registered Users Posts: 6 Beginner grinner
Hello,

I'm using the REST API to query my available albums and the pictures in the albums. I use the smugmug.images.getURLs method to get the URLs for the images.

I've built a little slide show of the images in a particular album. The slideshow uses JavaScript to iterate over all of the image URLs and dynamically update an img tag's src attribute with the image URL. So far, so good.

The problem is, some of the images appear in Firefox, and some don't. I couldn't figure out why. Ironically, the same URL produces the image in IE. Digging deeper, I used Firefox's Page Info window and noticed that they "type" for images that appear is image/jpeg, while for those that don't appear, it's text/html.

It appears that Firefox doesn't render the image when the content-type is text/html, but it does when the content-type is image/jpeg.

This is fairly random and of course the content type is served by SmugMug, not by anything I do.

Is there any way around this problem? If it's on SmugMug's end, can it be fixed fairly easily? I need to use Firefox because of it's superior CSS rendering on other parts of my page.

Thank you!!!

-Ryan

Comments

  • bwgbwg Registered Users, Retired Mod Posts: 2,119 SmugMug Employee
    edited July 27, 2006
    i'll take a stab in the dark here.

    i believe the reason you're seeing the different types in firefox is that you're pulling some of your images from a gallery that has external linking turned off. When you request an image that has external linking off smugmug returns nothing. Firefox then has no choice but to interpret that as text/html because there is no image.

    You probably have the image cached in internet explorer, which is why they are showing up there. Check your gallery settings.

    this is a guess, but give it a check.
    Pedal faster
  • o_swaso_swas Registered Users Posts: 6 Beginner grinner
    edited July 27, 2006
    Excellent. How exactly do I check the external linking? I'm not finding it....

    Thank you!!
  • o_swaso_swas Registered Users Posts: 6 Beginner grinner
    edited July 27, 2006
    OK, I found the external link setting. I'll try it out.
  • o_swaso_swas Registered Users Posts: 6 Beginner grinner
    edited July 27, 2006
    Well, it works OK on another Windows computer and on Camino on OS X. All the images show up like they're supposed to. For some reason they don't all show up on my computer. I don't know why but my computer must be the oddball.
Sign In or Register to comment.