Loading media assets in Fusion scripts and render as images

Hi,

is it currently possible to load media assets from a given Media asset path into a Fusion script?
The use case is the implementation of a Header Slider. The idea is that the admin can define some media asset path where he can store several images. The Fusion script the reads the configured media asset path and loads the images in this path and renders them as images.

I haven’t found yet any example with this approach. Using this approach would also simplify the editing experience, instead of adding several child slider containers, the author simply can define some media asset path, or maybe also a media asset tag, and then it renders images located in this media asset path.

Thanks for help!

Long long time ago I built this package GitHub - Sebobo/Shel.MediaFrontend: Content elements and utilities for media in Neos CMS and it allows selecting a collection. All assets in that collection are then rendered.

@daniellienert gallery plugin can also do that: GitHub - daniellienert/DL.Gallery: Neos plugin to easily render image galleries.

thanks @sebobo for your quick answer :slight_smile: .
So as far as I understand it is needed to have some kind of PHP Helper class which extends Fusion/Eel to get the image assets right? I thouhgt maybe there is already some kind of Fusion/Eel Helper in the Neos core to use out-of-the-box.

Yes you need the DataSource for selecting collections/tags and you need the helper to query the assets from the selected collection/tag.

1 Like