add pdf support to the img directive