Skip to content

Add a possibility to pass a fallback image url to the optionsย #59

Open
@Takheer

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?

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions