Add a possibility to pass a fallback image url to the options
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.5k
- Forks
- 93
- PR merge metrics
- No merged PRs in 30d
Description
In my project, I need to get images via ipx, and if there is no such image, I would love to get some placeholder that I would have specified in options. So, is there any way to add such a thing, so the initialization would look like
import { createIPX, createIPXMiddleware } from "ipx";
const ipx = createIPX({
/* other options */
fallbackUrl: '/path/to/the/image.png'
});
const app = express();
app.use("/image", createIPXMiddleware(ipx));
Or is there already a way I could handle such 404 errors myself?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the createIPX options and createIPXMiddleware entry points to see how missing images become 404 responses and whether middleware errors are exposed for handling. Done means a configured fallbackUrl produces the placeholder for missing images while existing image requests retain their current behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100