Skip to content

Dev server has to be restarted to passthrough newly added image files #3694

@NathanBowers

Description

@NathanBowers

When adding a new image to a project Eleventy dev server has to be restarted for the new image to be served.

  • This is using .addPassthroughCopy("src/img/**/*.{png,gif,jpg,jpeg,pdf,svg,webp}"); in eleventy.js
  • Eleventy version: @11ty/[email protected]
  • Tried server with and without --incremental and it didn't help.

Reproduce:

  1. Have an eleventy project
  2. Add an image folder with some images
  3. Use addPassthroughCopy for those images to your config
  4. Create any html template that would render out an <img> element referencing one of the images in your project
  5. Start server
  6. View your template with <img> in web browser
  7. Add a new image file to your image folder
  8. Add a new <img> element to your html template referencing your newly added image file
  9. The new image will not be available and appears as a broken img src until the dev server is restarted

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions