Skip to content

fix: handle video thumbnails in Bunny Stream with fallback for missing data#6

Open
haraldlastfriday wants to merge 1 commit into
thomasvantuycom:mainfrom
haraldlastfriday:feature/fix-thumbnail-urlss
Open

fix: handle video thumbnails in Bunny Stream with fallback for missing data#6
haraldlastfriday wants to merge 1 commit into
thomasvantuycom:mainfrom
haraldlastfriday:feature/fix-thumbnail-urlss

Conversation

@haraldlastfriday

Copy link
Copy Markdown

Fix Bunny Stream thumbnail URL handling

This PR fixes an issue where the plugin assumed static thumbnail URLs, which would break when Bunny Stream regenerates thumbnails with new URLs.

The change implements proper dynamic URL handling to ensure thumbnails remain accessible even after Bunny Stream updates them.

Files changed:

  • src/Plugin.php - Updated thumbnail URL logic
  • src/fs/BunnyStreamFs.php - Added dynamic URL resolution

@thomasvantuycom

Copy link
Copy Markdown
Owner

Hi @haraldlastfriday,

Could you tell me in which situations the problem occurs that you're trying to solve?

@haraldlastfriday

haraldlastfriday commented May 1, 2026

Copy link
Copy Markdown
Author

@thomasvantuycom This was the fix that we added after discovering that the thumbnail url for a video stream was dynamic. Both in craft admin or our template code the thumbnail showed up as blank as the basis one did not exist anymore.
If someone inside bunny changes the thumbnail for a video stream, the url for the thumbnail gets updated with a postfix hash (as far as i remember). The video was also, because of size and some server limitations uploaded in bunny admin.

It only happens if this thumbnail is actually changed, so we did not notice right away, but ended up fixing it this way here. Feels not quite optimal, but also do not really see so many other ways to fix it myself.

@thomasvantuycom

Copy link
Copy Markdown
Owner

Hi @haraldlastfriday,

Thank you for the explanation. I see what the problem is, but do agree that the proposed solution doesn't feel quite optimal, as browsing assets in the Craft admin panel now requires an API request for every single asset. I'll have a think and see if I can come up with something else in the coming days.

@haraldlastfriday

Copy link
Copy Markdown
Author

@thomasvantuycom yes, definitely. For our usecase here its not such a big issue with many api calls.. yet. But hope you come up with a better solution of course.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants