It’s just string manipulation but I can’t figure it out. I have a thumb script expecting an image request in the form of
/thumb/assets/images/example/image.100x100.png
where the image "/assets/images/example/image.png" will be cropped and resized to 100x100 pixels and cached. So I’ve set up an image TV and in the template using a script basically like the one below (which excepts &img)
return '/thumb' . substr($img, 0, -strlen(strrchr($img, '.'))) . '.100x100.' . end(explode('.', $img));
In testing locally this works fine however as a snippet it ends up as
/thumb.100x100./assets/images/example/image.png
Any ideas?