show thumbnail only if jpeg, png, gif