How to get thumbnail creation working?

Hello,

i never got thumbnail creation working,… even on OSX/Mamp it’s not working for me. Do i miss something? Folder rights are ok, GD Lib is installed…

Is there any way ro “debug” the thumbnail creation function? is there a error log somewhere?

regards!

Could you provide your code that isn’t working?

i just use the plain sarter kit.
if i upload a image to a project page should’nt a smaller version of the image appear in the thumbs folder?

No, the starterkit templates do not use thumbnails, but the original images (mostly to not complicate things).

@distantnative Even if the starterkit’s templates do not use thumbs, they are nevertheless created upon uploading images via the panel?

@texnixe Oh sure, that should be the case. I didn’t think about that, since it didn’t appear to me that @Svnt was talking about the panel, but rather trying to set up own templates and thumbnail would not be created.

Ok, is a demo template with thumbnail creation around somewhere?

You can just change the the image line in the project template of the starterkit:

<img src="<?php echo thumb($image, array('width'=>'50px'))->url() ?>" alt="<?php echo $page->title()->html() ?>">

But as I said above, the thumbs should be created as soon as you upload an image via the panel, at least that’s how it works on my local installations (Mamp on OSX).

BTW: Is it the plainkit or the standard starterkit that you use? And does the panel work? What Kirby/Panel Version?

Sorry, I can only disagree.
The thumbs are build not before the page was opened the first time in a browser (tested with kirby-nightly-2.1.0-20150331160945 and with v 2.0.x).

The panel does not know the size of the images, we want to have in the templates or snippets.

Not true, @anon77445132. Thumbnails are created when loading the overview files page in the panel. Just tested it - and they do get created.

EDIT: Of course thumbnails for the panel, not for some specific site.

Yes, @distantnative, you are right, but …

… is code not for the panel.

And the thumbs, you mentioned, are not build after the upload on the page view in the panel, but if we have opened the overview files view in the panel.
This is another difference!

Sure, but since there are no thumbnails generated for @Svnt at all, @texnixe was pointing out that the panel should already generate some (cause I said that the starterkit/plainkit would not generate any). So that has nothing to do with this code block :wink: - that’s just a suggestion how to add thumbnails to the starterkit/plainkit templates for further testing

1 Like

True. As I said. Sadly, this difference it’s not really helping for @Svnt’s problem.

@Svnt:
Do you view the page view in the panel or the overview files view in the panel?

Page view is like:

and for this view NO thumbs are build!

Overview files view is like:

and here the thumbs “for the panel” are build!
Hint:
It is not always necessary to go to this view. Therefore thumbs must not exist for every page!

The One file view for only ONE file like

builds NO thumb!

@Svnt: Please answer the version question from @texnixe!

Hint: these pictures are from v. 2.0.6.

Supplement:
Thumbs are build from the panel, if the size of the pictures is small enough.
I think the size of the originally picture has to be smaller than 2000 pixel for this at the moment.

true, i have to use it in the template, stupid me.
works just fine!

http://getkirby.com/docs/cheatsheet/helpers/thumb

S.