So I have a folder of images that look like this
- img
-- 001
--- banner_620x350.jpg
--- banner_300x130.jpg
--- banner_180x60.jpg
-- 002
--- banner_300x130.jpg
--- banner_180x60.jpg
-- 003
--- banner_180x60.jpg
My current way to load an image looks like this
<img src="img/003/banner_620x350.jpg" alt="001" onError="this.onerror=null;this.src='img/003/banner_180x60.jpg';" />
because we well always have a 180x60 image but we not always have a 600x350 or 300x130
What I would like to do is this
if 600x350 exists uses it
else if does 300x130 exists use it
else use 180x60
PS: I can't check server side.