Kris-B / nanoGALLERY

image gallery simplified - jQuery plugin. Touch enabled, responsive, justified/cascading/grid layout and it supports pulling in Flickr, Google Photos and self hosted images.
https://nanogallery2.nanostudio.org/
439 stars 101 forks source link

Image Thumbnail Error handling #95

Open vbanuelos opened 8 years ago

vbanuelos commented 8 years ago

Currently: Thumbnail Images stop loading once there is bad image.

EX/ 6 images. Image 3 returns error. Only images 1, 2 appear in thumbnails. Opening viewer shows 6 images in image count, and able to cycle through all images (including bad one).

Desired: Remove bad image from thumbnails and viewer. Return nanoGallery error message with bad image url.

vbanuelos commented 8 years ago

I'm almost certain it currently fails at the thumbnailAppear function when called by the ResizeGalleryWidthtAuto function

The problem appears to come from the ResizeGalleryWidthtAuto function. Specifically within the both each loops. If an image never comes back, the loops always stop at that point.

Kris-B commented 8 years ago

What do you mean with "bad image"?

Kris-B commented 8 years ago

The ResizeGalleryWidthtAuto function requires the height and the width of the thumbnail images.

Could it be that a bad image has a width > 0 and a height = 0?

I don't know how to reproduce this issue...

Kris-B commented 8 years ago

btw, where are hosting your images?

vbanuelos commented 8 years ago

Sorry about the delay in answering. I meant bad images as in a link that now 404's.

We had an issue where an image was deleted, but was still being referenced by our implementation. All images would load in the thumbnail gallery up until that deleted image (in our case 3/8). The image viewer would work as expected (showing that it was a broken image).

Our content is being hosted by Azure Media Services.