dadler/thumbnail-zoom — Issue #14: Support trying multiple URLs for popup
Author: dadler
Created: 2011-11-27 08:41:21+00:00
State: open
Labels: SUG

With some sites, like flickr, there are multiple forms the image URL might take based on a given thumbnail or link URL, and there's no way to know in advance. EG flickr currently uses the Medium 640 size since that's likely to exist. We can't use the higher resolution size because if it doesn't exist, the user gets no popup image at all.

The SUG is to generate a prioritized list of URLs to try, and have the add-on use the highest priority which loads successfully as an image. EG it could try the "original", "large", "medium 640", and finally "medium 500" sizes from Flickr.

An alternative might be to use the flickr API to determine which resolutions exist, but trying multiple URLs may be a more general approach which could work with other sites too.

hoverzoom for Google Chrome actually uses both approaches (based on browsing its code on code.google.com).