I am using galleria on my html webpage and everything works fine while all images are available (HTTP 200).
If one Image is not available (HTTP 404) the gallery gives me this error and is no longer usable. Image not found: http://path...
.
How can galleria just ignore images which are not available or dont show the error message and just work with the ones which are successfully loaded?
It is reproduceable with the new version of galleria and just change the url of one image:
<a href="http://upload.wikimedia.org/wikipedia/commons/thumb/6/6c/Athabasca_Rail_at_Brule_Lake.jpg/800px-Athabasca_Rail_at_Brule_Lake.jpg">
<img
src="http://upload.wikimedia.org/wikipedia/commons/thumb/6/6c/Athabasca_Rail_at_Brule_Lake.jpg/100px-Athabasca_Rail_at_Brule_Lake.jpg",
data-big="http://upload.wikimedia.org/wikipedia/commons/thumb/6/6c/Athabasca_Rail_at_Brule_Lake.jpg/1280px-Athabasca_Rail_at_Brule_Lake.jpg"
data-title="Athabasca Rail"
data-description="The Athabasca River railroad track at the mouth of Brulé Lake in Alberta, Canada."
>
</a>
In the javascript of galleria its possible to set a dummy value. During debugging in error case the dummy value is used if its set.
internal constants
VERSION = 1.45,
DEBUG = true,
TIMEOUT = 30000,
DUMMY = 'dummy Image path',
And in the error case it is present in the gallery.
else {
// apply the dummy image if it exists
if ( DUMMY ) {
$( this ).attr( 'src', DUMMY );
} else {
Galleria.raise('Image not found: ' + src);
}