-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
No preview for meduza.io articles #2853
Comments
$ curl https://meduza.io/imgly/share/1517844117/slides/vokrug-shum-rekordnyy-snegopad-v-moskve > image Not clear on first pass why dims cannot be extracted |
So for this article above I have a preview image now. But this one's broken (as well as other more recent articles): https://meduza.io/feature/2021/04/07/proekt-rasskazal-o-vtoroy-zhene-ramzana-kadyrova-i-novoy-lichnosti-ego-pervoy-suprugi The issue is that their server sends content-type as if b"Content-Type" in headers:
media_type = headers[b"Content-Type"][0].decode("ascii")
+ scpos = media_type.find(';')
+ if scpos > 0:
+ media_type = media_type[:scpos]
else:
media_type = "application/octet-stream" |
@rkfg Any chance you'd be willing to put up a PR? |
I'll see what I can do. There's another issue that prevents the preview images for jpeg_thumbnail = ThumbnailRequirement(width, height, method, "image/jpeg")
png_thumbnail = ThumbnailRequirement(width, height, method, "image/png")
requirements.setdefault("image/jpeg", []).append(jpeg_thumbnail)
+ requirements.setdefault("image/jpg", []).append(jpeg_thumbnail)
requirements.setdefault("image/webp", []).append(jpeg_thumbnail)
requirements.setdefault("image/gif", []).append(png_thumbnail)
requirements.setdefault("image/png", []).append(png_thumbnail) Their content-type for the previews is |
It seems related enough to more robust handling of the |
Opened a PR #9788 that should fix this issue. |
Fixed via #9788. |
Description
There's no preview image for any article from meduza.io news site.
Steps to reproduce
Server drops a line in the log:
2018-02-06 15:31:22,234 - synapse.rest.media.v1.preview_url_resource - 238 - WARNING - GET-12191- Couldn't get dims for https://meduza.io/imgly/share/1517844117/slides/vokrug-shum-rekordnyy-snegopad-v-moskve
The image itself is quite fine, it's a PNG of size 1200x630.
Version information
The text was updated successfully, but these errors were encountered: