-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Resize and Fit fail to render some of images while using '--ignoreCache' #8025
Comments
I can reproduce the behavior with this:
But this works fine (don't ignore cache):
|
@jmooring thanks! From my perspective it looks like Fit & Resize generate broken images when working without cache together with with above of certain number of images. When I was using only 4 images everything worked fine, even though cache was turned off. |
While we need to fix this particular issue, running with |
Also, a note to whoever fixes these:
|
I was running into this issue today. At first I thought it was #7955, as both result in zero-length output. "ignoreCache" and disabling cache via maxAge sound like safe things to do, from the user perspective, so it may be worth adding a note in the docs, or a warning of some sort, until this is fixed. |
This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help. |
@Setr43 please write in English here.- |
I’m getting the same issue - images are being processed to 0 bytes size. Somehow, it depends on the exact size and the format (jpg/png). Removing the
|
This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help. |
Bumb, as the problems are reproduced especially when working with images in Git LFS. |
I ran into this issue today. In my case, it was triggered by having two or more pages with no title set in their front matter, and using I created a small proof of concept site that shows the behavior: https://github.com/mrled/hugo-test-ogimage. It's as simple as I could make it, with the minimum number of pages and layouts needed. I was interested to find that it's not consistent, such that sometimes the site generates just fine several times in a row before failing, so I started running my test builds in a loop. When I realized I had a problem, it was hard to track down the cause. I ran into this trying to add automatically generated og:image files to my site, so every page on my site was generating an image, and all I knew was that one page sometimes generated a zero-byte file instead. I had to hack my site apart bit by bit before I found the few pages with no title in their front matter that caused the problem. I had also included The following probably won't benefit other users, who now know just not to pass +1 the request to fix this or remove |
Verified that this is fixed by #11894. |
Fixed with #11894 |
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. |
Most of the images generated by
Resize
andFit
are broken.For every image in project I use partial
image.html
to create responsive images. Everything works fine when working on in-memory server, things breaks when generating deployment.To make sure no stale cache interfere with the result I use
hugo --minify --ignoreCache --cleanDestinationDir --gc
to generate deployment. After that in public folder I get image file as expected but half of them are broken, and can’t be open in any image viewer, their size is 0 bytes - it can be verified by checking generated /public folder.I created sample, minimal repo to reproduce this issue. All the images in posts are lowercase, kebab-case JPGs. All created in the same way using https://www.canva.com/ and later processed with GIMP. All have the same width and height.
The repo uses theme as submodule so the easiest way to clone it is:
git clone --recurse-submodules git@github.com:adamfaryna/hugo-images-test.git
Make sure to
npm i
The images renders fine when
hugo server --gc --disableFastRender -v
.The generated images are broken on deployment build:
It’s Github so the default repo is “main”.
I store project in case sensitive virtual volume so even though I work on macOS the case insensitivity is not a cause of an issue.
What version of Hugo are you using (
hugo version
)?Hugo Static Site Generator v0.79.0-DEV/extended darwin/amd64 BuildDate: unknown
macOS 10.15.7 Catalina
Does this issue reproduce with the latest release?
Yes
The text was updated successfully, but these errors were encountered: