Updated image path logic.