Fixing image tag ordering and rendering