Use as_image_save_filename() from appstream-glib
Use as_image_load_filename() from appstream-glib