Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add your own thumb generator not working #6338

Open
caplod opened this issue Mar 8, 2024 · 2 comments
Open

Add your own thumb generator not working #6338

caplod opened this issue Mar 8, 2024 · 2 comments
Labels
needs: information ❓ Requires more information to proceed type: stale 💤 Will be closed soon because there was no recent activity

Comments

@caplod
Copy link
Contributor

caplod commented Mar 8, 2024

Description

I have big problems with animated gifs in the panel. The whole server gets unresponsive trying to resize the gifs with imagemagick.

So I want to code my own thumb generator to ignore gifs.

I placed the example code from the documentation https://getkirby.com/docs/reference/plugins/components/thumb
into this location /site/plugins/thumbs/index.php

Expected behavior
Since I didnot write any Code for myThumbGenerator (what in the end I am trying to do) I expect to get an error.
But the Code never gets executed. I even placed a die;

Your setup

Kirby Version
3.9.8.1

@distantnative
Copy link
Member

It sounds what you are experiencing is the result of Kirby's async thumb generation.

When the initial requests runs Kirby's code, it's not the thumb component, but the file::version component getting called. Which creates .job files with all the instruction for the required modifications to the image (also name etc.).

When the actual image URL is then called, Kirby looks up if there is an already processed thumb available, or - if not - if a .job file is present. With the info from the job file, it then runs the thumb component to generate the actual thumb file.

But this is why you won't see your initial request be interrupted by die() as the thumb component will only be called on the individual image requests, not the main request.

@distantnative distantnative added the needs: information ❓ Requires more information to proceed label Mar 23, 2024
Copy link
Contributor

This issue has been marked as stale because it requires further input but has not seen activity in the past months. This is for us to prioritize issues that are still relevant and actionable. It will be closed if no further activity occurs within the next 15 days. If this issue is still relevant to you, please help us in gathering the necessary input.

@github-actions github-actions bot added the type: stale 💤 Will be closed soon because there was no recent activity label May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: information ❓ Requires more information to proceed type: stale 💤 Will be closed soon because there was no recent activity
Projects
None yet
Development

No branches or pull requests

2 participants