Fixing the image content due to directory check issue