# V.2.4 update breaks image links

**URL:** <https://forum.getkirby.com/t/v-2-4-update-breaks-image-links/5670>\
**Category:** Questions\
**Tags:** v2\
**Created:** [November 3, 2016, 9:31pm UTC](https://forum.getkirby.com/t/v-2-4-update-breaks-image-links/5670 "2016-11-03T21:31:57Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![francoisromain](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/francoisromain/32/5596_2.png) [@francoisromain](https://forum.getkirby.com/u/francoisromain)\
**Post date:** [November 3, 2016, 9:31pm UTC](https://forum.getkirby.com/t/v-2-4-update-breaks-image-links/5670/1 "2016-11-03T21:31:57Z")

</div>

Hello  
I just updated my site to v.2.4.

there is an error preventing the site to display. The original code in the template is

```auto
<a href="<?= $current->url() ?>"><img src="<?= $image->url() ?>" alt="<?= $current->title() ?>"
      srcset="<?= $image->resize(352)->url() ?> 352w,
        <?= $image->resize(680)->url() ?> 680w,
        <?= $image->resize(704)->url() ?> 704w,
        <?= $image->resize(1008)->url() ?> 1008w,
        <?= $image->resize(1336)->url() ?> 1336w,
        <?= $image->resize(1360)->url() ?> 1360w,
        <?= $image->resize(1664)->url() ?> 1664w,
        <?= $image->resize(1992)->url() ?> 1992w,
        <?= $image->resize(2016)->url() ?> 2016w,
        <?= $image->resize(2672)->url() ?> 2672w,
        <?= $image->resize(3328)->url() ?> 3328w,
        <?= $image->resize(3984)->url() ?> 3984w,
        <?= $image->resize(5344)->url() ?> 5344w"
      sizes="(max-width: 22rem) 352px,
        (max-width: 42.5rem) 680px,
        (max-width: 63rem) 1008px,
        (max-width: 83.5rem) 1336px,
        (max-width: 104rem) 1664px,
        (max-width: 123.5rem) 1992px,
        2672px" /></a>

```

in the browser the source code is highlighted in red and not showing on the page :

```auto
<img src="http://my-site.com/content/1-collections/4-autumn-winter-2016-2017/sessun-autumn-winter-16-17.jpg" alt="Autumn-Winter 2016-2017"
      srcset="http://my-site.com/thumbs/collections/autumn-winter-2016-2017/sessun-autumn-winter-16-17-352x176-blur.jpg 352w,
        http://my-site.com/thumbs/collections/autumn-winter-2016-2017/sessun-autumn-winter-16-17-680x340-blur.jpg 680w,
        http://my-site.com/thumbs/collections/autumn-winter-2016-2017/sessun-autumn-winter-16-17-704x352-blur.jpg 704w,
        http://my-site.com/thumbs/collections/autumn-winter-2016-2017/sessun-autumn-winter-16-17-1008x504-blur.jpg 1008w,
        http://my-site.com/thumbs/collections/autumn-winter-2016-2017/sessun-autumn-winter-16-17-1336x668-blur.jpg 1336w,
        http://my-site.com/thumbs/collections/autumn-winter-2016-2017/sessun-autumn-winter-16-17-1360x680-blur.jpg 1360w,
        http://my-site.com/thumbs/collections/autumn-winter-2016-2017/sessun-autumn-winter-16-17-1664x832-blur.jpg 1664w,
        http://my-site.com/thumbs/collections/autumn-winter-2016-2017/sessun-autumn-winter-16-17-1992x996-blur.jpg 1992w,
        http://my-site.com/thumbs/collections/autumn-winter-2016-2017/sessun-autumn-winter-16-17-2016x1008-blur.jpg 2016w,
        http://my-site.com/thumbs/collections/autumn-winter-2016-2017/sessun-autumn-winter-16-17-2672x1336-blur.jpg 2672w,
        

```

there is no more code after this on the page…

---

<div class="post-metadata">

**Author:** ![bastianallgeier](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/bastianallgeier/32/7569_2.png) [@bastianallgeier](https://forum.getkirby.com/u/bastianallgeier)\
**Post date:** [November 3, 2016, 9:33pm UTC](https://forum.getkirby.com/t/v-2-4-update-breaks-image-links/5670/2 "2016-11-03T21:33:20Z")

</div>

Could you somehow send me access to your setup? [bastian@getkirby.com](mailto:bastian@getkirby.com)

---

<div class="post-metadata">

**Author:** ![francoisromain](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/francoisromain/32/5596_2.png) [@francoisromain](https://forum.getkirby.com/u/francoisromain)\
**Post date:** [November 3, 2016, 9:44pm UTC](https://forum.getkirby.com/t/v-2-4-update-breaks-image-links/5670/3 "2016-11-03T21:44:54Z")

</div>

Is it ok if i make a .zip of the full website?

---

<div class="post-metadata">

**Author:** ![bastianallgeier](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/bastianallgeier/32/7569_2.png) [@bastianallgeier](https://forum.getkirby.com/u/bastianallgeier)\
**Post date:** [November 3, 2016, 9:49pm UTC](https://forum.getkirby.com/t/v-2-4-update-breaks-image-links/5670/4 "2016-11-03T21:49:06Z")

</div>

yes, of course! If it’s not 200 MB big 🙂

---

<div class="post-metadata">

**Author:** ![krisa](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/krisa/32/3415_2.png) [@krisa](https://forum.getkirby.com/u/krisa)\
**Post date:** [November 4, 2016, 7:17am UTC](https://forum.getkirby.com/t/v-2-4-update-breaks-image-links/5670/5 "2016-11-04T07:17:09Z")

</div>

Sorry little offtopic but isnt this a little excessive? 13 versions of one image? I mean there is 20px difference in the first step.

I asume this is test, because if its not its totaly not worth it. Just use something small for old mobiles, something for tablet, something for regular fullhd desktop and then the highest def for hidensity. Even that is probably overengineering.

---

<div class="post-metadata">

**Author:** ![francoisromain](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/francoisromain/32/5596_2.png) [@francoisromain](https://forum.getkirby.com/u/francoisromain)\
**Post date:** [November 4, 2016, 8:49am UTC](https://forum.getkirby.com/t/v-2-4-update-breaks-image-links/5670/6 "2016-11-04T08:49:58Z")

</div>

Why is it “not worth it”?

---

<div class="post-metadata">

**Author:** ![fabianmichael](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/fabianmichael/32/13901_2.png) [@fabianmichael](https://forum.getkirby.com/u/fabianmichael)\
**Post date:** [November 4, 2016, 9:29am UTC](https://forum.getkirby.com/t/v-2-4-update-breaks-image-links/5670/7 "2016-11-04T09:29:16Z")

</div>

Just my 2 cents on this topic, as I spent a lot of time thinking about these issues:

This is a very hard question in general. If you really want to overshoot on that topic, you could possibly create something like the hosted image-resizing service [Cloudinary](https://www.smashingmagazine.com/2016/01/responsive-image-breakpoints-generation/). They provide a free tool with a paid API, that applies a »smart« algorithm (I guess what they really mean is brute-forcing …) to select the right sizes for an image. Ehm … okay, one could use that and the results are quite okay, but does it really make sense to rely on a third-party for such tasks as they may change their API anytime soon or shutdown the service, which might not be too easy to replace.

Another option is to serve stronger-compressed images to so-called _retina_ displays, as the smaller pixels on these screens make JPEG artifacts less noticable. But that also means, that you need twice the amount of thumbnails. If you really want to squeeze the last byte out of your site, but also want to serve high-density displays. But to keep things sane, I would agree with you that in most cases about 5-6 images should be enough to make a good compromise between the effort it takes to generate and store all these images and the overall download size. Take a look around at the web and do some comparison with most other sites and you can be glad, that with only 5-6 images, your site will perform much better than an estimated 90% of other websites.

---

<div class="post-metadata">

**Author:** ![thguenther](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/thguenther/32/16708_2.png) [@thguenther](https://forum.getkirby.com/u/thguenther)\
**Post date:** [November 4, 2016, 9:32am UTC](https://forum.getkirby.com/t/v-2-4-update-breaks-image-links/5670/8 "2016-11-04T09:32:12Z")

</div>

The size difference between for example a 1336px wide image and a 1360px wide image is not much.

If you don’t use something like (the amazing) [Imagekit](https://github.com/fabianmichael/kirby-imagekit), Kirby will have to resize the image \>10 times every time you upload a new image **before loading the actual page**. If there are many images, you might even have to increase your `max_execution_time`. It slows things down and it doesn’t even help that much.

---

<div class="post-metadata">

**Author:** ![anon77445132](https://avatars.discourse-cdn.com/v4/letter/a/4da419/32.png) [@anon77445132](https://forum.getkirby.com/u/anon77445132)\
**Post date:** [November 4, 2016, 2:22pm UTC](https://forum.getkirby.com/t/v-2-4-update-breaks-image-links/5670/9 "2016-11-04T14:22:35Z")

</div>

My hints:

- Make sure the `/thumbs` folder exists and is writable for the webserver (permissions/owner on the file system, if it is not windows!).
- Make sure the used thumbs driver exists and works on your webserver (XAMPP on windows has only the default kirby driver `gd`: [https://getkirby.com/docs/cheatsheet/options/thumbs-driver](https://getkirby.com/docs/cheatsheet/options/thumbs-driver)).

Good luck!

---

<div class="post-metadata">

**Author:** ![francoisromain](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/francoisromain/32/5596_2.png) [@francoisromain](https://forum.getkirby.com/u/francoisromain)\
**Post date:** [November 4, 2016, 2:47pm UTC](https://forum.getkirby.com/t/v-2-4-update-breaks-image-links/5670/10 "2016-11-04T14:47:03Z")

</div>

Hey thanks HeinerEF. Bastian solve it by email. The GD library was timing out. Now I use imageMagick and everything is fine.

About the conversation to know if it is worth it or not to have that many variations. Yes this is a bit more work for me (to make the srcset) but as long as the thumbnails are pre-processed, and there is enough space on the server why not serve images to their exact size? I don’t see the problem.

---

<div class="post-metadata">

**Author:** ![krisa](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/krisa/32/3415_2.png) [@krisa](https://forum.getkirby.com/u/krisa)\
**Post date:** [November 6, 2016, 10:28am UTC](https://forum.getkirby.com/t/v-2-4-update-breaks-image-links/5670/11 "2016-11-06T10:28:28Z")

</div>

The fact you can do that doesnt mean you should do it. Its exacltly like someone said in above comments. You could theoreticaly make image for every single resolution. But why it is just sily?

Just measure it:  
There is realy not that big advantage if the image is same (is just scaled). You would target lowres screens like older mobiles and then there is jump to old tablets 1024px or something and then you would go for something like 1400 and then the high res. The point is that difference in size from 1400px and 1024px is almost nothing. Those resolutions are going to be mostly served by desktops anyway - so the size realy matters only on mobile phones. You realy need just like 5 steps probably less to achieve the same thing.

And frankly - you will probably waste much more kilobytes by setting up compresion of the images wrong than by not having exaclty right resolution.

If you would need the best and smallest images i would say you need some dedicated service like jpegmini or [compressor.io](http://compressor.io) those compress in smarter way then GD or imagemagic. But again this makes sense only for huge sites where the savings 50 kbs on image can save you money.

---

<div class="post-metadata">

**Author:** ![distantnative](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/distantnative/32/11319_2.png) [@distantnative](https://forum.getkirby.com/u/distantnative)\
**Post date:** [February 6, 2025, 4:54pm UTC](https://forum.getkirby.com/t/v-2-4-update-breaks-image-links/5670/12 "2025-02-06T16:54:52Z")

</div>


