Suggest an editImprove this articleRefine the answer for “What happens if the image is not found at the specified path?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)If the browser **cannot find the image** at the path specified in the `src` attribute, it will not complete the load and will perform fallback behavior: it shows empty space or a "broken image" icon. **Key point:** if the `alt` attribute is set, the browser displays its text instead of the picture, and this text can be read aloud by screen readers and taken into account by search engines.Shown above the full answer for quick recall.Answer (EN)ImageIf the browser **cannot find the image** at the path specified in the `src` attribute, it will not complete the load and will perform **fallback behavior**: --- ### 1. The browser will try to load the image It will send an HTTP request to the address specified in `src`: ```javascript GET /img/photo.jpg ``` If the server responds with an error (for example, **404 Not Found**, **403 Forbidden**, **500 Internal Server Error**) or the file is physically missing, the browser **will not be able to display the picture**. --- ### 2. A "broken image" is displayed Instead of the picture, the browser shows **empty space** or an **error icon**: usually a small icon with a cross, a torn file, or the text "image not found". Visually, it looks like this: such an icon, or empty space with an outline. --- ### 3. If the `alt` attribute is set, its text is shown If the `<img>` element has an `alt` attribute, the browser will display **this text** in place of the unavailable image: ```html <img src="notfound.jpg" alt="Photo temporarily unavailable"> ``` The screen will show: ```javascript Photo temporarily unavailable ``` Benefit: - the user understands that there was supposed to be an image; - screen readers can read this text aloud; - search engines take `alt` into account during indexing. --- ### 4. Example without `alt` ```html <img src="missing.jpg"> ``` If the file is not found, the user will see **empty space** or an **error icon**, but will not understand what was supposed to be there. --- ### 5. Behavior for different kinds of errors - If the path is wrong → the browser cannot find the resource. - If the format is corrupted → the browser cannot decode the image. - If the server is unavailable → loading "hangs" and then is aborted. In all cases the visual result is the same: **the image is not displayed**, and `alt` is used (if present). --- ### Summary: | Situation | What the browser does | |---|---| | Image found | Loads and shows the picture | | File not found (404) | Shows a "broken image" icon | | `alt` specified | Displays the text from `alt` instead of the picture | | `alt` missing | Just empty space | | Format corrupted | Display error, failure icon | --- **In simple terms:** if the browser did not find the picture, it shows **nothing** or an **error icon**, and if you added `alt`, it will display **your text instead of the image**.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.