Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GetImageSizeFromUrl for image url without Content-Type #1049

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

WqyJh
Copy link
Contributor

@WqyJh WqyJh commented Feb 27, 2024

Not all images carry a Content-Type header such as image/. When utilizing object storage solutions like AWS S3, it is essential to define the Content-Type at the time of upload; failing to do so will result in the adoption of the default content type, binary/octet-stream.

At present, the benefit of identifying the Content-Type lies in conserving bandwidth by filtering out invalid image URLs. Nevertheless, this approach incurs the expense of an additional HEAD request for each URL. Considering that the majority of URLs point to valid images, the overhead introduced by these requests outweighs the potential benefits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant