fix inline image management