Read the statement by Michael Teeuw here.
MMM-EasyPix - skip non-existend pics
-
I have different images that are displayed. Each of them has an MMM-EasyPix entry in the config. The images are switched through with MMM pages. Is there a way to jump directly to the next page if an image doesn’t exist in the pix folder?
-
Does nobody have an idea?
-
@Sven1894 nothing built in.
you’d have to add code to detect the loading error, and try the next one
-
@sdetweil do you have any Idea how I could detect the loading error?
-
@Sven1894 see
https://stackoverflow.com/questions/9815762/detect-when-an-image-fails-to-load-in-javascriptthere are a couple different ways depending how much you need/want to change
-
@sdetweil Thank you that helped me a little bit.
Do you know how I can send notifications to other modules with the MMM-EasyPix module?
I triedimage.onerror = this.sendNotification('Pic is not exisiting');
but it didnt send a notification.
-
@Sven1894 from where?