for image formulas, use existing image if available; add img_dir and img_base_url arguments to client