nuxt / nuxt/image

Disable indexing images

Open
#1,913 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1.5k
Forks
331
Avg merge
19h 52m
Merged PRs (30d)
9

Description

Hi all! Do we have a prop to disable image indexing or how can I completely disable image indexing in /_ipx/ directory?
I'm trying to overwrite headers using nitro route rules, but it only works with no /_ipx/ paths.

export default {
  '/sprites/**': { headers: { 'X-Robots-Tag': 'noindex, nofollow' } }, // Works cool
  '/_ipx/**': { // Doesn't work
    headers: {
      'X-Robots-Tag': 'noindex, nofollow',
    },
  },
}

Enviroment:
"@nuxt/image": "1.10.0"
"nuxt": "^3.17.7"

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Nuxt Image 1.10.0 handling of the /_ipx/ entry point and Nitro route rules. Reproduce the supplied configuration, then trace why headers work for /sprites/** but not /_ipx/**. Done means image indexing can be disabled or the supported configuration is documented and verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
nuxt, typescript
Domain
web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.