Store image resolution to proper attributes instead of width/height