php-tmdb / symfony

Symfony 4,5 and 6 Bundle for TMDB ( The Movie Database ) API. Provides easy access to the php-tmdb/api library.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Possibility to filter url_poster in twig view

welcoMattic opened this issue · comments

Hi,

Is there possible to pass a url_poster as string to the image filter in a twig view ?

Thanks

Hi @welcoMattic ,

Currently string path's only are not supported, the helper always expects an Image object currently (which holds the path in $filePath ). I think the ImageFactory would help you out here though, review this method https://github.com/wtfzdotnet/php-tmdb-api/blob/master/lib/Tmdb/Factory/ImageFactory.php#L47 and let me know if that helps you any further. :-)

I've given this some thought, although I find it very unlikely for Symfony2 implementations to skip the modeled approach, the filter should still work for API implementations. I'll fix this later tonight in the development branch of php-tmdb-api.

Fixed in the development branch, see php-tmdb/api@d443ad6.

Please make sure you post issues in the correct repository next time :-).