francoischalifour/medium-zoom

Optional Zoom

mjshea1 opened this issue · 1 comments

The problem

Is there an option when you add medium-zoom to a vuepress site to disable it on some images within the markdown?

Solution

The ability to disable zoom on images within a vuepress site.

Implementation

I don't have an idea of how to implement it.

You'll need to edit the selector option in the VuePress plugin, and add this no-zoom CSS class to the images you want to skip.

Example:

module.exports = {
  plugins: {
    '@vuepress/medium-zoom': {
      selector: 'img:not(.no-zoom)',
    }
  }
}