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

Use YouTube poster for image thumb in Craft 5 CP element cards #283

Open
chrisrowe opened this issue Nov 11, 2024 · 4 comments
Open

Use YouTube poster for image thumb in Craft 5 CP element cards #283

chrisrowe opened this issue Nov 11, 2024 · 4 comments

Comments

@chrisrowe
Copy link

What would you like to see added to or changed in Embedded Assets, and why?

When choosing a YouTube embed the Craft 5 element card image shows the JSON file type, it'd be great if this plugin could instead use the poster (the image propery) from within this file?

@ttempleton
Copy link
Contributor

This should be working already - is the image showing in the assets index? If so, could you please post an example of a YouTube video that's not showing the image on the card?

@chrisrowe
Copy link
Author

chrisrowe commented Nov 12, 2024

Aha thank you, yes it works for local filesystems but it seems that it's not working on a site staged on Servd https://servd.host/ their assets are stored offsite on an S3 compatible CDN.

Looking at _configureAssetThumbnails() it appears the $thumbnailUrl is correct and $event->url is being updated but the front end still shows the JSON file SVG, nothing of interest in the log files either. Any ideas or things to look out for?

@ttempleton
Copy link
Contributor

I've run a test with an (admittedly different) S3 service and that's worked for me. I'll ask my colleagues if they've noticed any issues, but I have a couple of questions just to try to narrow down the cause:

  • Do thumbnails work as expected for embedded asset types other than YouTube?
  • Do they work as expected when using an assets field with a list or large thumbnail view mode?

@chrisrowe
Copy link
Author

Huh, has to be a Servd thing then, probably because files are publically avalible without a key which the Servd plugin handles when using getUrl. Here's a video with some more clues, (the dev volume is local) https://up.chri.sr/Screen-Recording-2024-11-18-11-39-08-1731929948.mp4.

Confirming thumbnails don't work with other view modes or in an asset field.

I poked around in your plugin code and was able to get the ytimg.com to output when debugging but I guess something else is going on

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants