check if image exists + change tpl + check image type