Support various image formats and quality

[#82948250]