tweak to img logic