Code Monkey home page Code Monkey logo

Comments (4)

kepano avatar kepano commented on July 17, 2024

Obsidian has an existing feature for this — see Obsidian docs

You can define the dimensions via this notation ![[image.png|100x100]]

If you want to disable maximizing the width of images you can also write a snippet like

.markdown-preview-view .image-embed img:not([width]) {
  width:auto;
}

Or set the width value to whatever you want the default to be

from obsidian-minimal.

mochsner avatar mochsner commented on July 17, 2024

@kepano this CSS override is perfect, and simple! thank you. While obsidian's implementation isn't % based (my desire to use % is something I'm pushing for official obsidian support of), Obsidian's width and width/height override is a great feature to use as well.

In regards to the obsidian-minimal theme setting, this default of auto is exactly what I need to be able to comfortable use the obsidian-minimal theme again. I imagine others might like it as well, because one wouldn't really expect a "theme" (UI) to have a direct impact on how something like images function in the app itself - in particular for folks who paste screenshots of small items (such as UI components) to paste into the editor.

Question: would it be significant development to add this as a toggle-based setting in obsidian-minimal-settings, if there's demand? I'd be happy to help with development for that (preferably in a few weeks) if you think it might be useful!

from obsidian-minimal.

kepano avatar kepano commented on July 17, 2024

This is done. See 3.2.2

from obsidian-minimal.

mochsner avatar mochsner commented on July 17, 2024

@kepano you're the man! 🍻

from obsidian-minimal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.