Check if images are available before loading them