# How to center an image automatically with minimal theme and image auto upload plugin?

**URL:** <https://forum.obsidian.md/t/how-to-center-an-image-automatically-with-minimal-theme-and-image-auto-upload-plugin/34683>\
**Category:** Devs: Theme Design & Custom CSS\
**Tags:** custom-css\
**Created:** [March 26, 2022, 12:51am UTC](https://forum.obsidian.md/t/how-to-center-an-image-automatically-with-minimal-theme-and-image-auto-upload-plugin/34683 "2022-03-26T00:51:52Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Cecilia\_May](https://forum.obsidian.md/user_avatar/forum.obsidian.md/cecilia_may/32/64356_2.png) [@Cecilia\_May](https://forum.obsidian.md/u/Cecilia_May)\
**Post date:** [March 26, 2022, 3:37am UTC](https://forum.obsidian.md/t/how-to-center-an-image-automatically-with-minimal-theme-and-image-auto-upload-plugin/34683/4 "2022-03-26T03:37:55Z")

</div>

Hello there @hqgu . Let me know if this snippet works:

```auto
img {
        display: block !important;
        margin-left: auto !important;
        margin-right: auto !important;
}
    
 .markdown-source-view.mod-cm6 .cm-content > * {
        margin: auto auto !important;
}

```

This should center images, embeds automagically!

---

_[View the full topic](https://forum.obsidian.md/t/how-to-center-an-image-automatically-with-minimal-theme-and-image-auto-upload-plugin/34683)._
