Fix panelgrid syntax based on image condition