Fixing the "URI signature match failed" error while displaying Reddit Images

Shawn Rebello

While trying to pull images from Reddit using its json API for an app I ran into a strange error,
Using the extracted image url, a few images would load perfectly but others would fail.


Digging a little deeper, it is clear that the image url  supplied by the reddit api is incorrect. Attempting to open the url in the browser gives the error:
URI signature match failed.

Consider the following url supplied by reddit:

Replacing the & amp ; with a & will return the correct image url.

*As of 14-2-2017, this issue still persists.

So this can be fixed by replacing all instances of & with & which can be done with regex in all most every language.
Since I'm working with Angular at the moment, I wrote a simple ts fix:

 let oldURL: string = "";
 let newURL: string = oldURL.replace(/&/g,"&");

Note the g after /&/ that is to make sure multiple occurrences of the string matching are replaced.
Hope this helps!

Shawn Rebello / Author & Editor

Shawn Rebello is an engineering student who likes learning new languages, tools, libraries or frameworks. When he is not coding, he binge watches TV shows and spends time on Wikipedia and Reddit.


  1. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a Front end developer learn from Javascript Training in Chennai . or Javascript Training in Chennai. Nowadays JavaScript has tons of job opportunities on various vertical industry. ES6 Training in Chennai

  2. I appreciate your efforts because it conveys the message of what you are trying to say. It's a great skill to make even the person who doesn't know about the subject could able to understand the subject . Your blogs are understandable and also elaborately described. I hope to read more and more interesting articles from your blog. All the best.

    rpa training in bangalore
    best rpa training in bangalore
    RPA training in bangalore
    rpa course in bangalore
    rpa training in chennai
    rpa online training

  3. Thank you for benefiting from time to focus on this kind of, I feel firmly about it and also really like comprehending far more with this particular subject matter. In case doable, when you get know-how, is it possible to thoughts modernizing your site together with far more details? It’s extremely useful to me
    python Course in Pune
    python Course institute in Chennai
    python Training institute in Bangalore


  4. Does your blog have a contact page? I’m having problems locating it but, I’d like to shoot you an email. I’ve got some recommendations for your blog you might be interested in hearing.
    AWS Training in Chennai |AWS Training Course in Chennai
    AWS Training in Chennai | AWS Training in Chennai cost
    AWS Training in Chennai | Aws Training Institute in Chennai


  5. Your good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this.
    microsoft azure training in bangalore
    rpa training in bangalore
    best rpa training in bangalore
    rpa online training

  6. Excellent post!!!. The strategy you have posted on this technology helped me to get into the next level and had lot of information in it.
    AWS training in sholinganallur
    AWS training in Tambaram
    AWS training in Velachery

  7. Nice This Post And Great Your Article This Information Very Use full For Me Thank You For Sharing This Information. Guide to Recovering Data From Hard Drive Yourself

  8. I play a lot and win, what are you capable of? best online casino games with us Play, win or be defeated.

  9. The Viper SmartStart GPS is a tracker for car created by a few of the top-rated automobile alarm makers. viper smart login

  10. Looking for pokezz com alternatives for Pokemon Go Hacks.

  11. Ahhh I'm so glad I stumbled upon this site. I was very lucky literally in the first two hours I earned in more than one working day, you also want? hold on useful play casino You can not thank

  12. Python is a general-purpose interpreted, interactive, object-oriented and high-level programming language. Currently Python is the most popular Language in IT. Python adopted as a language of choice for almost all the domain in IT including Web Development

    myTectra Amazon Web Services (AWS) certification training helps you to gain real time hands on experience on AWS. myTectra offers AWS training in Bangalore using classroom and AWS Online Training globally.
    Read more

  13. Really very happy to say that your post is very interesting. I never stop myself to say something about it. You did a great job. Keep it up.
    We have an excellent IT courses training institute in Hyderabad. We are offering a number of courses that are very trendy in the IT industry. For further information, please once go through our site.
    AWS Training In Hyderabad

  14. Attend The Python Training in Bangalore From ExcelR. Practical Python Training in Bangalore Sessions With Assured Placement Support From Experienced Faculty. ExcelR Offers The Python Training in Bangalore.

  15. Attend The Data Analytics Courses in Bangalore From ExcelR. Practical Data Analytics Courses in Bangalore Sessions With Assured Placement Support From Experienced Faculty. ExcelR Offers The Data Analytics Courses in Bangalore.
    ExcelR Data Analytics Courses in Bangalore

  16. Thanks for such a great article here. I really appreciate , it helps to improve my knowledge. Now i am waiting for your next blog!! Machine Learning Course


Leave a comment here!