update img directive