Forum
Kraken App
I've added Kraken to a Perch site (running 2.8.5) with an api (and a new paid Kraken account).
Tried adding three JPEGs last night. They are in the resources folder (at their original size) but I was expecting them to have been 'processed' and reduced file size. Kraken > Jobs shows all three as PENDING but only lists the -thumb@2x versions of the files.
Apart from adding the api details (both parts) and setting mode to production, I have left the image base URL as the default (https://www.example.com). Should this be the resources sub directory?
Is your site publicly accessible? Kraken does a callback to your site to let Perch know the image is ready to download.
Ah, I wondered about that. Presumably I need to grant write access to the resources directory.
The app overwrites the existing file with the optimised version. Presumably the image has been uploaded through Perch, so it should be writable already.
The file has been uploaded through Perch. Permissions are User: rw Group: r World: r And the Resources folder: rwx r-x r-x
Permissions shouldn't be an issue - if Perch writes the file it should be able to overwrite it.
I tried changing the Image base URL parameter to https://www.example.com/perch/resources but that doesn't appear to have made any difference.
Anything else I can try
If you turn on debug, and then use a new image, after saving you should see some (I think orange) debug messages showing what's been sent to Kraken. What does it output?
The base URL should be
https://example.com
- we then append the image path to that to make the full URL. So an image with pathbecomes
Perhaps I don't know how to turn on debug. I've added a line to my Perch config file but this only outputs a debug message at the end of each page in the admin pages. There isn't anything there about sending files to Kraken.
Incidentally, Perch is logging me out frequently which is unusual. John
Can you show me your diagnostics?
Ah, I've managed to get an image processed. What I did was to select an existing [image] asset (because I wanted to change it) selected the replacement image and then clicked submit.
The debug message is below. And the list of recent jobs for Kraken shows the new file as COMPLETED
Ok, great. That's how it should be working.
So, I've tested this further. If you add an asset (I'm working with JPEGs) without selecting a bucket Kraken works fine which is great. But if I select a bucket (clicking By Bucket) and then add an asset it doesn't get processed by Krakenand shows as PENDING.
At which point at you selecting a bucket?
The only way I know to select the bucket is before you add an asset. I select the bucket from the dropdown after clicking By bucket, click Add asset and then drop the file into the drop area. If I select the bucket after clicking Add asset the drop zone goes away and I have to click Add asset again. In both cases the image ends up as PENDING (in the Kraken job list) and does not process as far as I can see.
Ok, great. That gives me something to test. I'll see what I can come up with.
The more common way to add an asset to a bucket is to use the
bucket
attribute on a template tag - when a new asset is uploaded to that content item, it goes into the named bucket.Oh yes, that's how it would normally be done. But, with this client, I've been bulk uploading of 12 or more images at a time which are then used on various pages: this is a gallery site for artists.
Now I know, We'll revert to adding them from the individual template pages.
Both methods are equally fine - but knowing what you're doing helps me track down the issue.