We have recently migrated from SharePoint 2010 to SharePoint 2013. But After migration the images are now double encoded.

 Example: the Image URL is

https://abc.com/User
Photos/Profile Pictures/mykft_kembh00_MThumb.jpg
 

 On My profile, space is getting encoded
to %20 and making the URL

https://abc.com/User%20Photos/Profile%20Pictures/mykft_kembh00_MThumb.jpg.

And on Web Part, system is fetching the
image URL from My Profile and again encoding % to %25 and making the URL as

 https://abc.com/User%2520Photos/Profile%2520Pictures/mykft_kembh00_MThumb.jpg due to which the images are not coming on the web
part.

Resolution: I dint get the proper resolution, but the below approach fixed my issue

I added one Content Editor Web Part (You can also add Script editor web part) and wrote below script in the web part. This script is replacing the %2520 with%20, which fixed my issue and images started coming on the Site

<script
type="text/javascript"
src="StyleLibrary/js/DntDeletejquery.min.js"></script>

<script
type="text/javascript">

 $(document).ready(function() {

    var strNewString = $('#s4-workspace').html().replace(/\%2520/g,'%20');

    $('#s4-workspace').html(strNewString);

});

</script>

 

Thank you,

Anuradha Sehgal (Happy Learning)