question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Image's non-shortened URL not accepted by tests

See original GitHub issue

Challenge Add Images to your Website has an issue. User Agent is: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36. Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:


<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
  .red-text {
    color: red;
  }

  h2 {
    font-family: Lobster, Monospace;
  }

  p {
    font-size: 16px;
    font-family: Monospace;
  }
</style>

<h2 class="red-text">CatPhotoApp</h2>

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
<img src="https://s3.amazonaws.com/freecodecamp/relaxing-cat.jpg" alt="kitten image"/>

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:15 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
BlauFeuercommented, Aug 23, 2016

The test constraint doesn’t state your image tag needs the correct link, so why does the test look for it? (@tertiaryidentifier Unless your test is to write a test that tests it.)

Your img element should have the class smaller-image.

1reaction
dhcodescommented, Aug 22, 2016

Not a mod, but I recommend we consider using the real link (https://s3.amazonaws.com/freecodecamp/relaxing-cat.jpg). It would be more reliable longterm and is only 23 characters longer. I would wager many users are likely copying/pasting the src link anyway.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Shorten URL not working if bit.ly is primary shortener and "use ...
If your problem is that Shorten URLs is falling back to the secondary service, that means the request to bit.ly is failing. Usually...
Read more >
The 7 best URL shorteners of 2022 - Zapier
Still miss Google's URL Shortener? Here are the best alternatives, whether you need something simple and quick or are looking for more advanced...
Read more >
12 of the Best URL Shorteners for Sleek Links in 2023
A good URL shortener (a.k.a. link shortener) lets you do two things: 1. Share links that don't use too many characters. 2. Measure...
Read more >
Top 5 Ways To Prevent Broken Images And Links On Your ...
#3 – Prevent Broken Links. · Use short, simple, easy-to-read and easy-to-type URLs. When creating links to a specific page, product, event, ...
Read more >
The Beginner's Guide to URL Shorteners - Buffer
A comprehensive look at how to shorten URLs and track links for sharing on social media, video, email, print, and more.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found