# Simple Media Gallery for Books, Movie,TV-Series, Games, etc

**URL:** <https://community.silverbullet.md/t/simple-media-gallery-for-books-movie-tv-series-games-etc/3795>\
**Category:** Plugs and Libraries\
**Created:** [January 24, 2026, 6:33pm UTC](https://community.silverbullet.md/t/simple-media-gallery-for-books-movie-tv-series-games-etc/3795 "2026-01-24T18:33:13Z")\
**Posts on this page:** 10\
**Page:** 2

<div class="post-metadata">

**Author:** ![Mr.Red](https://community.silverbullet.md/user_avatar/community.silverbullet.md/mr.red/32/821_2.png) [@Mr.Red](https://community.silverbullet.md/u/Mr.Red)\
**Post date:** [February 4, 2026, 9:25am UTC](https://community.silverbullet.md/t/simple-media-gallery-for-books-movie-tv-series-games-etc/3795/21 "2026-02-04T09:25:39Z")

</div>

> [@Mike](#):
>
> That does the trick, thanks!

I will add it later to the library, expect an update later or tomorrow where this snippet will be included.

---

<div class="post-metadata">

**Author:** ![Mr.Red](https://community.silverbullet.md/user_avatar/community.silverbullet.md/mr.red/32/821_2.png) [@Mr.Red](https://community.silverbullet.md/u/Mr.Red)\
**Post date:** [February 4, 2026, 10:17pm UTC](https://community.silverbullet.md/t/simple-media-gallery-for-books-movie-tv-series-games-etc/3795/22 "2026-02-04T22:17:25Z")

</div>

# [UPDATE]

- just pushed an update with snippet to move the widget control buttons outside the widget window, which should fix the issue (raised by @Mike ) of overlapping buttons in the top right corner.

---

<div class="post-metadata">

**Author:** ![Mike](https://community.silverbullet.md/letter_avatar_proxy/v4/letter/m/58f4c7/32.png) [@Mike](https://community.silverbullet.md/u/Mike)\
**Post date:** [February 6, 2026, 8:14am UTC](https://community.silverbullet.md/t/simple-media-gallery-for-books-movie-tv-series-games-etc/3795/23 "2026-02-06T08:14:40Z")

</div>

I was trying to setup a custom mediaGallery and it doesn't pickup my custom config (which is kept in my CONFIG file). After some playing around, I solved it by moving the lines below into the widgets.mediaGallery function. With this adjustment, it picks up my config properly.

Am I making some mistake (it has been known to happen 🙄) or is this a bug?

```auto
-- Configuration Defaults
local cfg = config.get("mediaGallery") or {}
local tileSize = cfg.tileSize or "160px" -- default for posters
local pageRows = cfg.pageRows or 2 -- pagination limit by rows

```

---

<div class="post-metadata">

**Author:** ![Mr.Red](https://community.silverbullet.md/user_avatar/community.silverbullet.md/mr.red/32/821_2.png) [@Mr.Red](https://community.silverbullet.md/u/Mr.Red)\
**Post date:** [February 6, 2026, 9:25am UTC](https://community.silverbullet.md/t/simple-media-gallery-for-books-movie-tv-series-games-etc/3795/24 "2026-02-06T09:25:47Z")

</div>

Technically you shouldn't modify anything in the source

just add the config example to a space-lua codeblock in your CONFIG page (or technically any page should work too).

```lua
config.set("mediaGallery",{
  tileSize = "180px", -- default value for Virtual Page or if not specified in widget
  pageRows = 2, -- default value for Virtual Page or if not specified in widget
-- custom = {
-- {"object","person",{"name","birthday","phone","emoji"}}
-- }
})

```

If it the config still doesn't apply/load correctly, check/add the priority to the config codeblock:  
`-- prioirity: 10` or `-- prioirity: 100` or any higher positive number, depending on your setup.

This should make the config load in the correct order. If this solves the issue please give me a short feedback, so I can add it to the config example or documentation.

---

<div class="post-metadata">

**Author:** ![Mike](https://community.silverbullet.md/letter_avatar_proxy/v4/letter/m/58f4c7/32.png) [@Mike](https://community.silverbullet.md/u/Mike)\
**Post date:** [February 6, 2026, 9:37am UTC](https://community.silverbullet.md/t/simple-media-gallery-for-books-movie-tv-series-games-etc/3795/25 "2026-02-06T09:37:43Z")

</div>

Thanks, setting the priority addresses the problem. Forgot about the whole loading order thing.

PS: I know modifying the source is not the way to go, but it did help me to troubleshoot the issue, at least to some degree.

---

<div class="post-metadata">

**Author:** ![Mr.Red](https://community.silverbullet.md/user_avatar/community.silverbullet.md/mr.red/32/821_2.png) [@Mr.Red](https://community.silverbullet.md/u/Mr.Red)\
**Post date:** [February 6, 2026, 9:44am UTC](https://community.silverbullet.md/t/simple-media-gallery-for-books-movie-tv-series-games-etc/3795/26 "2026-02-06T09:44:24Z")

</div>

if this solved your issue, I might modify the space-lua in the library with `-- priority: -1` this might even solve the necessity to use the priority attribute in the config alltogether.

I'll do some tests and will update the library later today with the -1 priority.

Thanks for your feedback.

PS: I thinking about modifying all my libraries and adding the `--priority: -1` to all codeblock which supposed to use config, so that the order is already dictated by the library and not needign to set anything in the config

---

<div class="post-metadata">

**Author:** ![Mr.Red](https://community.silverbullet.md/user_avatar/community.silverbullet.md/mr.red/32/821_2.png) [@Mr.Red](https://community.silverbullet.md/u/Mr.Red)\
**Post date:** [February 6, 2026, 12:01pm UTC](https://community.silverbullet.md/t/simple-media-gallery-for-books-movie-tv-series-games-etc/3795/27 "2026-02-06T12:01:55Z")

</div>

I pushed the update of the Library with `-- priority: -1` in the space-lua block.

Can you confirm that if you remove the `-- priority` attribute from your config, it it still works?

---

<div class="post-metadata">

**Author:** ![Mike](https://community.silverbullet.md/letter_avatar_proxy/v4/letter/m/58f4c7/32.png) [@Mike](https://community.silverbullet.md/u/Mike)\
**Post date:** [February 6, 2026, 12:16pm UTC](https://community.silverbullet.md/t/simple-media-gallery-for-books-movie-tv-series-games-etc/3795/28 "2026-02-06T12:16:46Z")

</div>

I can confirm that the updated version works - I removed the priority line from my CONFIG and updated the library and my config is still correctly loaded.

---

<div class="post-metadata">

**Author:** ![goldwarq](https://community.silverbullet.md/user_avatar/community.silverbullet.md/goldwarq/32/1528_2.png) [@goldwarq](https://community.silverbullet.md/u/goldwarq)\
**Post date:** [March 12, 2026, 8:11pm UTC](https://community.silverbullet.md/t/simple-media-gallery-for-books-movie-tv-series-games-etc/3795/29 "2026-03-12T20:11:56Z")

</div>

Would it be possible to add some kind of tutorial on how to use this? I have installed it but am completely stumped. The virtual pages are empty, and I can't figure out how to add any data.

---

<div class="post-metadata">

**Author:** ![Mr.Red](https://community.silverbullet.md/user_avatar/community.silverbullet.md/mr.red/32/821_2.png) [@Mr.Red](https://community.silverbullet.md/u/Mr.Red)\
**Post date:** [March 12, 2026, 9:10pm UTC](https://community.silverbullet.md/t/simple-media-gallery-for-books-movie-tv-series-games-etc/3795/30 "2026-03-12T21:10:29Z")

</div>

You can use the dedicated Media Manager to add Movies/TV-Shows/Books automatically to the gallery.

1. Install this library from my repo: [MediaManager](https://github.com/Mr-xRed/silverbullet-libraries/blob/main/MediaManager.md)

 ![image](https://community.silverbullet.md/uploads/default/original/2X/d/d28ba80c13d9c3299236f53eebeca7e951900718.png)

1. Then Run the `Media Manager: Add item` command and follow the instructions:  

2. Select the Media type you want to add, e.g.: Books:  

3. Search and add the desired book.  

4. This will automatically will create a new page with the media informations:

 ![image](https://community.silverbullet.md/uploads/default/original/2X/2/28e1d2c838f8f298e8e05e6cc71117a44e58260d.png)

1. Then you navigate to that specific virtual page(Books/TV-Shows/Movie): you'll see the added media:

 ![image](https://community.silverbullet.md/uploads/default/original/2X/8/864b5e6d07ccee00443bd683eab10f08162c3203.jpeg)

of course if you want to add your own media type for example: Contacts, Games, Pokemon Cards etc. you can do so by creating specific object codeblocks or Pages using your custom codeblock-tag or writing the attributes to the page frontmatter.

If you have something specific in mind you would like to add to the gallery other than TV-Shows/Books/Movies, feel free to give some more detail, and the source & information of that media type, and i could give you some more instructions, but without knowing exactly for what do you want to use the Media Gallery, i cant be more specific.

[Previous page](https://community.silverbullet.md/t/simple-media-gallery-for-books-movie-tv-series-games-etc/3795.md?page=1)
