Socket
Socket
Sign inDemoInstall

@cssninja/nuxt-media-viewer

Package Overview
Dependencies
12
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @cssninja/nuxt-media-viewer

A media viewer for public assets in Nuxt.js


Version published
Maintainers
2
Created

Readme

Source

@cssninja/nuxt-media-viewer

A media viewer for public assets in Nuxt.js

Features

  • Preview assets with their meta data
  • Generate snippets for responsive/retina images
  • Generate and customize inline SVG from your assets

Installation

  1. Add @cssninja/nuxt-media-viewer dependency to your project
# Using pnpm
pnpm add -D @cssninja/nuxt-media-viewer

# Using yarn
pnpm add -D @cssninja/nuxt-media-viewer

# Using npm
npm install --save-dev @cssninja/nuxt-media-viewer
  1. Add @cssninja/nuxt-media-viewer to the modules section of nuxt.config.js
export default defineNuxtConfig({
  modules: [
    '@nuxt/devtools',
    '@cssninja/nuxt-media-viewer'
  ]
})
  1. Go to the media viewer page and start previewing your assets at http://localhost:3000/__media_viewer/client/ or open the devtools and click on the Media Viewer tab.

Configuration

type ModuleOptions = {
  /**
   * @default false
   */
  installIpxMiddleware?: boolean

  /**
   * @default '/_ipx'
   */
  ipxMiddlewarePrefix?: string
}
export default defineNuxtConfig({
  modules: [
    '@cssninja/nuxt-media-viewer'
  ],
  mediaViewer: {
    installIpxMiddleware: false,
    ipxMiddlewarePrefix:  '/_ipx',
  }
})

Development

  • Run npm run dev to develop the client UI.
  • Use npm run dev:playground to start playground in development mode.

FAQs

Last updated on 10 Mar 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc