Avatar generation with protocol independent URL

We are also facing same issue. S3 is enabled in our case.