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

Image Processing on filenames of 60 characters or greater panic Hugo #4261

Closed
tech4him1 opened this Issue Jan 12, 2018 · 0 comments

Comments

Projects
None yet
2 participants
@tech4him1

tech4him1 commented Jan 12, 2018

If a image resource (v0.32 page bundles) has a filename of 60 characters or greater, and an image processing function is run on it (Resize, Fill, or Fit), Hugo panics with this error:

Failed to render "layouts\_default\list.html": runtime error: slice bounds out of range

Example Code:

{{ range .Resources.ByType "image" }}
    {{ $image = .Resize "200x" }}
    <img src="{{ $image.RelPermalink }}">
{{ end }}

Example Filename (crashing, 60 chars including extension): 1234567890qwertyuiopasdfghjklzxcvbnm5to6eeeeee7via8eleph.jpg
Removing any one character causes it to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment