# Hugo 0.56.1 and Image Resize

**URL:** <https://discourse.gohugo.io/t/hugo-0-56-1-and-image-resize/19882>\
**Category:** support\
**Created:** [July 29, 2019, 3:29pm UTC](https://discourse.gohugo.io/t/hugo-0-56-1-and-image-resize/19882 "2019-07-29T15:29:23Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![rstranzenbach](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/rstranzenbach/32/7975_2.png) [@rstranzenbach](https://discourse.gohugo.io/u/rstranzenbach)\
**Post date:** [July 29, 2019, 3:29pm UTC](https://discourse.gohugo.io/t/hugo-0-56-1-and-image-resize/19882/1 "2019-07-29T15:29:23Z")

</div>

My Hugo bases website makes use of the Image .Resize and .Fit Operations to generated different sized images for the article covers and gallery thumbnails.

This works using Hugo 0.55.6 but fails with 0.56.1

Hugo reports the .ResourceType as “image”, therefore I would expect Hugo to be able to resize as expected.

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [July 29, 2019, 4:07pm UTC](https://discourse.gohugo.io/t/hugo-0-56-1-and-image-resize/19882/2 "2019-07-29T16:07:48Z")

</div>

Do you get an error?

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [July 29, 2019, 4:51pm UTC](https://discourse.gohugo.io/t/hugo-0-56-1-and-image-resize/19882/3 "2019-07-29T16:51:10Z")

</div>

Possibly related to what @brunoamaral experienced

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [July 29, 2019, 5:19pm UTC](https://discourse.gohugo.io/t/hugo-0-56-1-and-image-resize/19882/4 "2019-07-29T17:19:46Z")

</div>

One question: What extension do you use for your images: \*.jpg or \*.JPG or \*.JPEG?

I say this because we made a change in the way we do MIME resolution. I have a nagging feeling that it is identified as an image named image.JPG, but it fails to resolve the converter (because that use the filename’s extension).

I will create an issue about this and figure out a proper fix, but in the meantime the workaround is to make sure that your images are named sunset.jpg, logo.png (e.g. lower case extensions).

---

<div class="post-metadata">

**Author:** ![rstranzenbach](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/rstranzenbach/32/7975_2.png) [@rstranzenbach](https://discourse.gohugo.io/u/rstranzenbach)\
**Post date:** [July 30, 2019, 7:30am UTC](https://discourse.gohugo.io/t/hugo-0-56-1-and-image-resize/19882/5 "2019-07-30T07:30:51Z")

</div>

I’ve mostly used .jpg Images but there is one .JPG and one .jpeg image in my list of article cover images.

There is an error message displayed as `Hugo` stops processing the templates.

```auto
Gwenfrewi:avd_infopoint ralf$ docker run --rm -it -v /Users/ralf/git/avd_infopoint:/src -p 1313:1313 hugo:0.56.1 hugo --verbose --verboseLog
Total in 6034 ms
Error: Error building site: failed to render pages: render of "home" failed: "/src/themes/hugo-theme-avd/layouts/index.html:15:31": execute of template failed: template: index.html:38:5: executing "index.html" at <partial "news.html" .>: error calling partial: "/src/themes/hugo-theme-avd/layouts/partials/news.html:15:31": execute of template failed: template: partials/news.html:15:31: executing "partials/news.html" at <$resource.Resize>: can't evaluate field Resize in type *resources.genericResource

```

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [July 30, 2019, 7:44am UTC](https://discourse.gohugo.io/t/hugo-0-56-1-and-image-resize/19882/6 "2019-07-30T07:44:00Z")

</div>

I have fixed the upper case issue in master, will release 0.56.2 later today.

---

<div class="post-metadata">

**Author:** ![rstranzenbach](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/rstranzenbach/32/7975_2.png) [@rstranzenbach](https://discourse.gohugo.io/u/rstranzenbach)\
**Post date:** [July 30, 2019, 7:56am UTC](https://discourse.gohugo.io/t/hugo-0-56-1-and-image-resize/19882/7 "2019-07-30T07:56:04Z")

</div>

**BTW:** it would make debugging issues much easier, if there is some chance to “print” into the generators output. I had some problems with `Hugo` not able to proceed in generating the templates so there was no chance to have a look Ito the generated HTML.

---

<div class="post-metadata">

**Author:** ![rstranzenbach](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/rstranzenbach/32/7975_2.png) [@rstranzenbach](https://discourse.gohugo.io/u/rstranzenbach)\
**Post date:** [July 30, 2019, 1:18pm UTC](https://discourse.gohugo.io/t/hugo-0-56-1-and-image-resize/19882/8 "2019-07-30T13:18:07Z")

</div>

I just created a new `hugo` installation and this problem is obviously solved in 0.56.2.

```auto
Gwenfrewi:avd_infopoint ralf$ hugo version
Hugo Static Site Generator v0.56.2-5F033A7F linux/amd64 BuildDate: 2019-07-30T09:08:21Z

Gwenfrewi:avd_infopoint ralf$ hugo-serve
INFO 2019/07/30 13:17:06 No translation bundle found for default language "en"
INFO 2019/07/30 13:17:06 Translation func for language en not found, use default.
INFO 2019/07/30 13:17:06 i18n not initialized; if you need string translations, check that you have a bundle in /i18n that matches the site language or the default language.
INFO 2019/07/30 13:17:07 Using config file: 
Building sites … INFO 2019/07/30 13:17:07 syncing static files to /
INFO 2019/07/30 13:17:08 found taxonomies: map[string]string{"category":"categories", "tag":"tags"}
INFO 2019/07/30 13:17:22 found no layout file for "HTML" for "404": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.

                   | EN   
+------------------+-----+
  Pages | 100  
  Paginator pages | 0  
  Non-page files | 181  
  Static files | 78  
  Processed images | 103  
  Aliases | 0  
  Sitemaps | 1  
  Cleaned | 0  

Total in 15868 ms
Watching for changes in /src/{content,data,static,themes}
Watching for config changes in /src/config.toml
Environment: "development"
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://0.0.0.0:1313/avd/ (bind address 0.0.0.0)
Press Ctrl+C to stop

```

---

<div class="post-metadata">

**Author:** ![alexandros](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@alexandros](https://discourse.gohugo.io/u/alexandros)\
**Post date:** [January 24, 2020, 1:21pm UTC](https://discourse.gohugo.io/t/hugo-0-56-1-and-image-resize/19882/9 "2020-01-24T13:21:17Z")

</div>


