Added image handling for admin & twig function.