Decode thumbnail filename?

I tried the thumbnail function and it generated thumbnails with these kinds of names…

filename-3fd34vdvsddsf3532432.png

The key in the end of the filename are some encoded version of the filename? How can I decode it? I try to use Kirby as screenshot service. Then I need to know to decode them from outside, like this…

decode_image_filename('filename.png', 'width' => '300');

…should return…

filename-3fd34vdvsddsf3532432.png

@sashtown ?

Have a look at the source code of the Kirby toolkit: https://github.com/getkirby/toolkit/blob/master/lib/thumb.php

The second part ist simply a md5 hash of the full path of the image and the so called settings identifier which is basically a string made of the concatenated thumb settings (source code).

The hash is created using md5 encryption, so that actually shouldn’t be that easy to decrypt …

Actually, I think @jenstornell isn’t trying to decode the filename but to generate the filename of the thumbnail outside of the main Kirby application by passing only the source file’s filename and the thumbnail settings.

@twirx: Yes, you’re right, it’s only an added string, so it’s not important …