I’m searching for a backend for a mobile app. So I found KIRBY! I’ve watched a video how a site is set up. And I really liked the flexibility! I’ve downloaded KIRBY, and made it run on my machine.
But now I’m searching for a tutorial, how to read the data with an API call and get a JSON as a result.
I just found this:
This does not help me a lot!
Can anybody give me a link with how to get started with API calls?
But now let’s say I’ve a page. In the text file of the page I’ve defined a variable telling me this page has an icon.
As I know the URL of the page and also know the filename of the icon, I thought I could load the image directly. It works in the browser but the URL changes while loading.
The field value doesn’t provide the url to the file, so you would have to either serve the files directly from the content folder instead of from the media folder, or make the connection between the field value and the images in the page (by querying the images of the page), see https://kql.getkirby.com/ (then add the filename to the images query).
Must admit that I’m not really familiar with KQL. And I think there will be improvements to image handling once KQL makes it into the Kirby core.
I just call the URL in the Browser! As described, the thumb is generated and can be found. BUT the local Server crashes and no picture shows up in the browser
The THUMBSERVER works on my uberspace account but also with your include it does not work on my local machine. There is a change now it takes a long time the server is responsive again but it does not crash anymore.
You might need to set the bin location on your local config depending on how you installed imagemagick. For example, i use Valet as a local server and installed image magic via homebrew.
Since this installs IM to a nonstandard location that would be expected on a real websever, you need to set the bin option to tell Kirby were to find the IM binary. If you pull up a terminal and run the following command:
which convert
It will print the location of the IM binary, which for me is /opt/homebrew/bin/convert
then in your config, decalare this in the thumbs settings.
I’ve followed your instructions same issue. I also do not think it’s a matter of the location of IM because the thumbs are generated and can be found in the folder. They do just not open and the server crashes.
I did not manage to geht the FileInfo extension of php to install. Maybe this is the problem?