Skip to content

[FEATURE] Fallback icon for non-image media files#51

Open
davidsteeb wants to merge 1 commit into
mainfrom
BEXT-223-video-fallback
Open

[FEATURE] Fallback icon for non-image media files#51
davidsteeb wants to merge 1 commit into
mainfrom
BEXT-223-video-fallback

Conversation

@davidsteeb

Copy link
Copy Markdown
Contributor

Media previews rendered files via f:image only. For non-image files (e.g. a video or audio file in the media field of a textmedia element) this breaks or leaves the preview empty.

Changes

  • Media/Image.html: branch on the file type — render f:image for images (type 2) and a TYPO3 <core:icon> fallback otherwise (mimetypes-media-video / mimetypes-media-audio / mimetypes-other-other).
  • Add .b_image--icon styling so the fallback aligns with image previews.

Pure Fluid/CSS solution — no version-specific PHP (works on TYPO3 v10.4–v14). PHPStan v14 passes locally.

Resolves BEXT-223.

Media previews rendered the file via f:image only, which breaks or
stays empty for non-image files (e.g. video/audio in the media field).
Render a TYPO3 file type icon (video/audio/generic) as a fallback when
the file is not an image.

Resolves: BEXT-223
@davidsteeb davidsteeb self-assigned this Jun 11, 2026

@achimfritz achimfritz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

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