Page MenuHomePhabricator

Image not rendering properly on most projects
Closed, DuplicatePublicBUG REPORT

Description

Steps to replicate the issue:

Original bug report at: https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(technical)#An_image_not_displaying_properly

Event Timeline

Can you still reproduce? Right now at all the wikis mentioned, the image is working fine for me.

Agreed. I cannot reproduce anymore.
(But they were all definitely broken (showing the 'broken image' icon) for a few hours).
I'll leave this task unresolved in case it needs follow-up from devs.

Still broken for me:

 curl 'https://upload.wikimedia.org/wikipedia/commons/thumb/0/05/Prof.Anna-Teresa_Tymieniecka.JPG/250px-Prof.Anna-Teresa_Tymieniecka.JPG' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:137.0) Gecko/20100101 Firefox/137.0' -H 'Accept: image/avif,image/webp,image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5'
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>Wikimedia Error</title>
<style>
* { margin: 0; padding: 0; }
body { background: #fff; font: 15px/1.6 sans-serif; color: #333; }
.content { margin: 7% auto 0; padding: 2em 1em 1em; max-width: 640px; }
.footer { clear: both; margin-top: 14%; border-top: 1px solid #e5e5e5; background: #f9f9f9; padding: 2em 0; font-size: 0.8em; text-align: center; }
img { float: left; margin: 0 2em 2em 0; }
a img { border: 0; }
h1 { margin-top: 1em; font-size: 1.2em; }
.content-text { overflow: hidden; overflow-wrap: break-word; word-wrap: break-word; -webkit-hyphens: auto; -moz-hyphens: auto; -ms-hyphens: auto; hyphens: auto; }
p { margin: 0.7em 0 1em 0; }
a { color: #0645ad; text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: sans-serif; }
summary { font-weight: bold; cursor: pointer; }
details[open] { background: #970302; color: #dfdedd; }
.text-muted { color: #777; }
@media (prefers-color-scheme: dark) {
  a { color: #9e9eff; }
  body { background: transparent; color: #ddd; }
  .footer { border-top: 1px solid #444; background: #060606; }
  #logo { filter: invert(1) hue-rotate(180deg); }
  .text-muted { color: #888; }
}
</style>
<meta name="color-scheme" content="light dark">
<div class="content" role="main">
<a href="https://www.wikimedia.org"><img id="logo" src="https://www.wikimedia.org/static/images/wmf-logo.png" srcset="https://www.wikimedia.org/static/images/wmf-logo-2x.png 2x" alt="Wikimedia" width="135" height="101">
</a>
<h1>Error</h1>
<div class="content-text">

<p>Too Many Requests</p>
</div>
</div>
<div class="footer"><p>If you report this error to the Wikimedia System Administrators, please include the details below.</p><p class="text-muted"><code>Request served via cp3077 cp3077, Varnish XID 1043015365<br>Upstream caches: cp3077 int<br>Error: 429, Too Many Requests at Tue, 22 Apr 2025 21:36:09 GMT<br><details><summary>Sensitive client information</summary>IP address: xxx</details></code></p>
</div>
</html>

However with a different Accept header it works strangely :

curl 'https://upload.wikimedia.org/wikipedia/commons/thumb/0/05/Prof.Anna-Teresa_Tymieniecka.JPG/250px-Prof.Anna-Teresa_Tymieniecka.JPG' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:137.0) Gecko/20100101 Firefox/137.0' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
Warning: Binary output can mess up your terminal. Use "--output -" to tell
Warning: curl to output it to your terminal anyway, or consider "--output
Warning: <FILE>" to save to a file.

There is a similar error with https://upload.wikimedia.org/wikipedia/commons/thumb/3/38/Rail_Bridge_%28Humphery%29_Gayndah_%282002%29.jpg/330px-Rail_Bridge_%28Humphery%29_Gayndah_%282002%29.jpg (reported by @Kerry_Raymond on the Wikimedia-AU-Members mailing list).

Request served via cp5029 cp5029, Varnish XID 427591308
Upstream caches: cp5029 int
Error: 429, Too Many Requests at Wed, 23 Apr 2025 01:37:08 GMT

The first request seemed to get a 500 error, and then subsequent ones a 429:

$ curl -I 'https://upload.wikimedia.org/wikipedia/commons/thumb/3/38/Rail_Bridge_%28Humphery%29_Gayndah_%282002%29.jpg/330px-Rail_Bridge_%28Humphery%29_Gayndah_%282002%29.jpg'
HTTP/2 500 
date: Wed, 23 Apr 2025 01:29:16 GMT
server: Varnish
x-cache: cp5029 int
x-cache-status: int-front
server-timing: cache;desc="int-front", host;desc="cp5029"
strict-transport-security: max-age=106384710; includeSubDomains; preload
report-to: { "group": "wm_nel", "max_age": 604800, "endpoints": [{ "url": "https://intake-logging.wikimedia.org/v1/events?stream=w3c.reportingapi.network_error&schema_uri=/w3c/reportingapi/network_error/1.0.0" }] }
nel: { "report_to": "wm_nel", "max_age": 604800, "failure_fraction": 0.05, "success_fraction": 0.0}
x-client-ip: xxx
access-control-allow-origin: *
access-control-expose-headers: Age, Date, Content-Length, Content-Range, X-Content-Duration, X-Cache
timing-allow-origin: *
content-type: text/html; charset=utf-8
content-length: 2107

$ curl -I 'https://upload.wikimedia.org/wikipedia/commons/thumb/3/38/Rail_Bridge_%28Humphery%29_Gayndah_%282002%29.jpg/330px-Rail_Bridge_%28Humphery%29_Gayndah_%282002%29.jpg'
HTTP/2 429 
date: Wed, 23 Apr 2025 01:29:59 GMT
server: Varnish
x-cache: cp5029 int
x-cache-status: int-front
server-timing: cache;desc="int-front", host;desc="cp5029"
strict-transport-security: max-age=106384710; includeSubDomains; preload
report-to: { "group": "wm_nel", "max_age": 604800, "endpoints": [{ "url": "https://intake-logging.wikimedia.org/v1/events?stream=w3c.reportingapi.network_error&schema_uri=/w3c/reportingapi/network_error/1.0.0" }] }
nel: { "report_to": "wm_nel", "max_age": 604800, "failure_fraction": 0.05, "success_fraction": 0.0}
x-client-ip: xxx
access-control-allow-origin: *
access-control-expose-headers: Age, Date, Content-Length, Content-Range, X-Content-Duration, X-Cache
timing-allow-origin: *
content-type: text/html; charset=utf-8
content-length: 2043

However with a different Accept header it works strangely

This one doesn't seem to be fixed by changing the Accept header.

However with a different Accept header it works strangely :

I think this was just cache splitting, it is now not working either

The actual thumbnailing error from thumbor is the same for both files:

2025-04-23 03:10:27 thumbor-1  | 2025-04-23 02:10:27 thumbor:ERROR ERROR: Traceback (most recent call last):
2025-04-23 03:10:27 thumbor-1  |   File "/opt/lib/venv/lib/python3.11/site-packages/thumbor/handlers/__init__.py", line 212, in get_image
2025-04-23 03:10:27 thumbor-1  |     result = await self._fetch(self.context.request.image_url)
2025-04-23 03:10:27 thumbor-1  |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-04-23 03:10:27 thumbor-1  |   File "/opt/lib/venv/lib/python3.11/site-packages/thumbor/handlers/__init__.py", line 885, in _fetch
2025-04-23 03:10:27 thumbor-1  |     raise fetch_result.exception
2025-04-23 03:10:27 thumbor-1  |   File "/opt/lib/venv/lib/python3.11/site-packages/thumbor/handlers/__init__.py", line 853, in _fetch
2025-04-23 03:10:27 thumbor-1  |     self.context.request.engine.load(fetch_result.buffer, extension)
2025-04-23 03:10:27 thumbor-1  |   File "/srv/service/wikimedia_thumbor/engine/proxy/proxy.py", line 125, in load
2025-04-23 03:10:27 thumbor-1  |     self.lcl[enginename].load(buffer, extension)
2025-04-23 03:10:27 thumbor-1  |   File "/opt/lib/venv/lib/python3.11/site-packages/thumbor/engines/__init__.py", line 199, in load
2025-04-23 03:10:27 thumbor-1  |     image_or_frames = self.create_image(buffer)
2025-04-23 03:10:27 thumbor-1  |                       ^^^^^^^^^^^^^^^^^^^^^^^^^
2025-04-23 03:10:27 thumbor-1  |   File "/srv/service/wikimedia_thumbor/engine/imagemagick/imagemagick.py", line 77, in create_image
2025-04-23 03:10:27 thumbor-1  |     self.read_exif(temp_file)
2025-04-23 03:10:27 thumbor-1  |   File "/srv/service/wikimedia_thumbor/engine/imagemagick/imagemagick.py", line 139, in read_exif
2025-04-23 03:10:27 thumbor-1  |     metadata.read()
2025-04-23 03:10:27 thumbor-1  |   File "/opt/lib/venv/lib/python3.11/site-packages/pyexiv2/metadata.py", line 117, in read
2025-04-23 03:10:27 thumbor-1  |     self.__image._readMetadata()
2025-04-23 03:10:27 thumbor-1  | ValueError: Not a valid ICC Profile
2025-04-23 03:10:27 thumbor-1  | 
2025-04-23 03:10:27 thumbor-1  | 2025-04-23 02:10:27 thumbor:ERROR [BaseHandler] get_image failed for url `https%3A//upload.wikimedia.org/wikipedia/commons/0/05/Prof.Anna-Teresa_Tymieniecka.JPG`. error: `Not a valid ICC Profile`
2025-04-23 03:10:27 thumbor-1  | 2025-04-23 02:10:27 tornado.access:ERROR 500 GET /thumbor/unsafe/450x/https://upload.wikimedia.org/wikipedia/commons/0/05/Prof.Anna-Teresa_Tymieniecka.JPG (172.22.0.1) 747.18ms
2025-04-23 03:11:03 thumbor-1  | 2025-04-23 02:11:03 thumbor:ERROR ERROR: Traceback (most recent call last):
2025-04-23 03:11:03 thumbor-1  |   File "/opt/lib/venv/lib/python3.11/site-packages/thumbor/handlers/__init__.py", line 212, in get_image
2025-04-23 03:11:03 thumbor-1  |     result = await self._fetch(self.context.request.image_url)
2025-04-23 03:11:03 thumbor-1  |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-04-23 03:11:03 thumbor-1  |   File "/opt/lib/venv/lib/python3.11/site-packages/thumbor/handlers/__init__.py", line 885, in _fetch
2025-04-23 03:11:03 thumbor-1  |     raise fetch_result.exception
2025-04-23 03:11:03 thumbor-1  |   File "/opt/lib/venv/lib/python3.11/site-packages/thumbor/handlers/__init__.py", line 853, in _fetch
2025-04-23 03:11:03 thumbor-1  |     self.context.request.engine.load(fetch_result.buffer, extension)
2025-04-23 03:11:03 thumbor-1  |   File "/srv/service/wikimedia_thumbor/engine/proxy/proxy.py", line 125, in load
2025-04-23 03:11:03 thumbor-1  |     self.lcl[enginename].load(buffer, extension)
2025-04-23 03:11:03 thumbor-1  |   File "/opt/lib/venv/lib/python3.11/site-packages/thumbor/engines/__init__.py", line 199, in load
2025-04-23 03:11:03 thumbor-1  |     image_or_frames = self.create_image(buffer)
2025-04-23 03:11:03 thumbor-1  |                       ^^^^^^^^^^^^^^^^^^^^^^^^^
2025-04-23 03:11:03 thumbor-1  |   File "/srv/service/wikimedia_thumbor/engine/imagemagick/imagemagick.py", line 77, in create_image
2025-04-23 03:11:03 thumbor-1  |     self.read_exif(temp_file)
2025-04-23 03:11:03 thumbor-1  |   File "/srv/service/wikimedia_thumbor/engine/imagemagick/imagemagick.py", line 139, in read_exif
2025-04-23 03:11:03 thumbor-1  |     metadata.read()
2025-04-23 03:11:03 thumbor-1  |   File "/opt/lib/venv/lib/python3.11/site-packages/pyexiv2/metadata.py", line 117, in read
2025-04-23 03:11:03 thumbor-1  |     self.__image._readMetadata()
2025-04-23 03:11:03 thumbor-1  | ValueError: Not a valid ICC Profile
2025-04-23 03:11:03 thumbor-1  | 
2025-04-23 03:11:03 thumbor-1  | 2025-04-23 02:11:03 thumbor:ERROR [BaseHandler] get_image failed for url `https%3A//upload.wikimedia.org/wikipedia/commons/3/38/Rail_Bridge_%28Humphery%29_Gayndah_%282002%29.jpg`. error: `Not a valid ICC Profile`
2025-04-23 03:11:03 thumbor-1  | 2025-04-23 02:11:03 tornado.access:ERROR 500 GET /thumbor/unsafe/450x/https://upload.wikimedia.org/wikipedia/commons/3/38/Rail_Bridge_%28Humphery%29_Gayndah_%282002%29.jpg (172.22.0.1) 442.39ms

So just a dupe of T381594