fixed file extensions on image code