Add image alignment code