Skip to content

Add option to declare image styles outside the module. #16

@ghost

Description

Ideally, components should be able to declare their own style with no need for it to exist in nuxt.config.js. For example:

<template>
  <div>
    <nuxt-img
      :src="testImage"
      :image-style="imageStyle"
      alt="Never forget alt tags!" />
  </div>
</template>

<script>
export default {
  data () {
    return {
      testImage: '/test.png',
      imageStyle: {
        macros: [
          'scaleAndCrop|160|90',
        ],
      },
    }
  }
}
</script>

This would make components much more reusable across projects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions