README file from
GithubMedia grid
An obsidian plugin to wrap media inside a grid
Supported Media
Image extensions: ['jpg', 'jpeg', 'png', 'webp']
Video extensions: ['mp4']
Anything beyond these file extensions will be treated as unknown format and an error callout will be rendered.
NOTE: Media format is completed derived from the file extension and NOT file metadata. So it is possible to trick Obsidian into attempting to render an invalid file just by renaming the extension.
Config
| Property | Type | Description | Default value | Notes |
|---|---|---|---|---|
cols |
number |
Number of columns to render in the grid | 4 |
|
gap |
number |
Gap between rows and column | 4 |
^1 |
grid-container-id |
string |
An unique id to be assigned the rendered grid container | - | ^2 |
Example
You should now see all your images in a grid. Also, the grid container will have the id #nice-grid which can be used to further customize the styles using css snippets.

NOTE: Images used in this project are sourced from pexels.com. They are used in accordance with the applicable license. I do not claim ownership of these images. All rights remain with their respective creators.
Notes
- Keep each config property and media file in its own separate line
- If a grid row contains images of different height, the row's height will be set to that of the image with maximum height leaving any unwanted space around smaller images. Autoscaling images was intentionally left out so as to not strech/shrink images. If per image customization is required, you may still use the
grid-container-idand customize with css.
Installation Instructions
Refer these instructions to try it out locally
Todo
- Basic grid
-
cols,gapandgridContainerId
-
- Image rendering
- Media size
- Video rendering
-
column gapandrow gap
[^1] Css grid does support different gaps for rows and columns. But, as of now, this plugin doesn't support that. The same gap will be used for both rows and columns. [^2] Grid container id can be used to further customize the grid behaviour using css snippets.