Hi yall!
I am very new to kirby with rudimentary php knowledge.
I am working in localhost with an as of yet unregistered version, willing to register as soon as I have my site finished for upload.
Following problem: I have profils that can create blogs. on the profil I want to display a grid with all written blogentries by that profile.
So far so good.
I collect a preview image for that reason in yml in the fields
image:
label: Bild
type: files
layout: cards
max: 1
required: true
uploads:
template: image
It uploads in the folder, its there, I see a preview, but I cant get it with
<?php foreach ($specials as $special): ?>
<?php if ($image = $special->image()->toFiles()->first()): ?>
<img src="<?= $image->url() ?>" alt="">
<?php endif; ?>
<?php endforeach; ?>
I can however get it with
$image = $special-->images()->first();
However, thats not what I want.
When I try to debug it shows that the img src is empty.
Listing the images however, I can see that the images are in the folder.
I am a bit lost.
Any pointers?
I did do all the empty or delete cache things, deleted all files, images, created new ones for test purposes etc.
Thankfull for any help.
Oh - in the blueprint the Image is saved like so:
----
Image: - file://7yhhih5nt7emyyqg
----
And in the jpg.txt like so:
Uuid: 7yhhih5nt7emyyqg
----
Template: image
I also do have a image.yml in /blueprints/files looking like so:
title: Bild
accept:
type: image
mime:
- image/jpeg
- image/png
- image/gif
- image/webp