Change image attribute format