added img url check for .png/.jpg extension