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
Remote image gets: *resources.genericResource is not an image #9275
Comments
The extension is |
Which might be what causes the error, but if you download the image, you'll see that the file's extension is jpg. If this is indeed a JPE file, and Hugo does not support, we should be able to test this through |
It seems that the browser infers the type of the image if the path does not have an extension, so it adds .jpg. If you use wget, you get the binary file without an extension whose operation is similar to what hugo does. |
Interesting. So maybe the problem is that the Hugo returns a SubType of |
When we retrieve this image, this is what happens.
On Ubuntu, the sorted list of extensions associated with So, the first extension on the list is Similar py challenge: |
Add jpe, jif, and jfif to image/jpeg extensions. For remote image/jpeg without extension, always use jpg extension. Closes gohugoio#9275
Add jpe, jif, and jfif to image/jpeg extensions. For remote image/jpeg without extension, always use jpg extension. Closes #9275
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
What version of Hugo are you using (
hugo version
)?hugo v0.90.1-48907889+extended darwin/amd64 BuildDate=2021-12-10T10:56:41Z VendorInfo=gohugoio
Does this issue reproduce with the latest release?
Yes
I'm trying to fetch an image remotely (https://images.unsplash.com/photo-1611323593958-0fec16fa2909) and grab its
.Width
and.Height
or use.Resize
. But the following ensue:error calling Width: *resources.genericResource is not an image
orerror calling Resize: *resources.genericResource is not an image
Note that
MainType
andSubType
areimage
andjpeg
respectively.This might be because the URL do not point to a file per say, but and endpoint serving a file. But then, the MainType/SubType are misleading and prevent any testing before trying to apply image transformation.
The text was updated successfully, but these errors were encountered: