
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@picperf/rehype
Advanced tools
Use this plugin to transform the URLs in your Markdown images into PicPerf URLs, ready to be optimzed.
Run npm install @picperf/rehype.
Wire it up by importing the plugin and configuring it with your Markdown setup. Here's an example from Astro:
import { rehypePicPerf } from "@picperf/rehype";
export default defineConfig({
markdown: {
rehypePlugins: [rehypePicPerf],
},
// Other stuff...
});
By default, absolute URLs will be prefixed with "https://picperf.dev". If you'd like to override this behavior for particular URLs, you can use the shouldTransform() option:
markdown:{
rehypePlugins: [[ rehypePicPerf, {
shouldTransform: (url) => {
// Return a boolean based on the URL, or not.
return false;
}
}]],
},
Out of the box, this plugin will not transform image root-relative URLs, like this:

In order to transform these, pass a host option. That value will be used when transforming the URL:
markdown:{
rehypePlugins: [[ rehypePicPerf, {
host: "https://macarthur.me"
}]],
},
Get in touch by finding me on Twitter/X or my website.
FAQs
A Remark plugin for optimizing images with PicPerf.io.
We found that @picperf/rehype demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.