Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Learn More

FIrefox presents saves jpg as webp

  • 5 trả lời
  • 1 gặp vấn đề này
  • 16 lượt xem
  • Trả lời mới nhất được viết bởi cor-el

more options

Here's the issue in a nutshell:

When I navigate to this URL (https://publicdelivery.b-cdn.net/wp-content/uploads/2015/12/Jeff-Koons-Michael-Jackson-and-Bubbles-1988-ceramic-106.7-x-179.1-x-82.5cm.jpg) intending on saving out the picture, Firefox ( or so it appears) forces the user to save it as webp, instead of its actual format, as you can see from the URL. Granted, I got to that photo in the first place from Google image search but spawned it into an independent window, which should occupy a separate memory space and not reference a previously cached file. While i get the primary application is to allow for multiple res versions while referencing only one file, this behaviour is pointless, irksome and serves no practical purpose when accessing the asset with an explicit URL, plus it puts unnecessary and Big Brother-ish barriers up for the less savvy. I solved the issue ultimately, but who is at fault here? Is this a function of Firefox or of the CDN where it's hosted?

Giải pháp được chọn

The fact that a link shows a .jpg file extension doesn't mean much as that is likely a leftover from the past when WebP didn't exist, it is just a request to retrieve an image. In the longer future it is quite possible that more image formats will become available that servers can choose from apart from image dimensions. If a browser indicates that it supports WebP then the server may decide to send a smaller WebP image instead of a JPG image.


Đọc câu trả lời này trong ngữ cảnh 👍 0

Tất cả các câu trả lời (5)

more options

Giải pháp được chọn

The fact that a link shows a .jpg file extension doesn't mean much as that is likely a leftover from the past when WebP didn't exist, it is just a request to retrieve an image. In the longer future it is quite possible that more image formats will become available that servers can choose from apart from image dimensions. If a browser indicates that it supports WebP then the server may decide to send a smaller WebP image instead of a JPG image.


Hữu ích?

more options

I get that, though i failed to also mention that when I hit it from jdownloader, the jpg image is the file that's downloaded, and as im to understand the user agent is mozilla based. Long story short, it's mainly the CDN and not firefox, specifically?

Hữu ích?

more options

You can't trust the file extension any more. Sites are trying to improve their appearance of responsiveness and reduce their bandwidth costs by using WebP compression on the fly for PNG and JPEG images for browsers that signal support for that format. With a stand-alone image displayed in its own tab, hover your mouse pointer over the tab until the tooltip appears and Firefox will tell you what it got.

This signaling is done through the Accept header: With each request, Firefox sends the site a list of formats it can handle, and on that list is image/webp. I assume JDownloader does not list that format, so it gets the legacy image. Actually, the Page Info dialog, Media tab, Save As feature also does not signal support for image/webp, at least at this time, so that is an alternate way to download the image in its legacy format.

But for more convenience, because there's no built-in setting to remove image/webp from the Accept list for stand-alone images, I created an extension to do it. If you want to take a look:

https://addons.mozilla.org/firefox/addon/dont-accept-webp/

Được chỉnh sửa bởi jscher2000 vào

Hữu ích?

more options

Thanks for the feedback guys- i should've assumed it was the middleware from the outset, but when one has an explicit url, one expects it to actually relate to an explicit resource. I'm to the point where i'm irritated enough by this to disallow webp at the browser level. @jscher Thanks also for explaining the architecture a little, clarifying the accept headers that are passed along behind the scenes. I'll give the plug a whirl- thank you for taking the bull by the horns to help limit this solipsistic phuckery.

Hữu ích?

more options

You can also check the type in the Network Monitor.

Hữu ích?

Đặt một câu hỏi

Bạn phải đăng nhập vào tài khoản của bạn để trả lời bài viết. Vui lòng bắt đầu một câu hỏi mới, nếu bạn chưa có tài khoản.