
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.
imgjs-subscribe-module
Advanced tools
IMGJS Subscribe Module - Email subscription and profile enrichment component
A vanilla JavaScript subscription form component that provides a user-friendly email subscription flow with optional profile enrichment.
Add this to your theme's header.php or via wp_head action:
<!-- Pre-configure the module (optional) -->
<script>
window.imgjs = window.imgjs || {};
window.imgjs.subscribeConfig = {
apiBaseUrl: 'https://your-wordpress-site.com/wp-json/imgjs/v1',
colors: {
primary: "#0073aa" // WordPress blue
}
};
</script>
<!-- Add the script -->
<script src="https://unpkg.com/@insight-media-group/imgjs/dist/imgjs-subscribe.min.js"></script>
Then use anywhere in your theme:
<!-- Simple button -->
<button onclick="window.imgjs.subscribe.open()">Subscribe Now</button>
<!-- With pre-filled email -->
<button onclick="window.imgjs.subscribe.open('<?php echo wp_get_current_user()->user_email; ?>')">
Update Your Profile
</button>
See examples/wordpress.html for full WordPress integration examples including:
npm install @insight-media-group/imgjs
You can include the module directly in your HTML using the CDN. There are two ways to configure it:
<!-- Configure before loading the script -->
<script>
window.imgjs = window.imgjs || {};
window.imgjs.subscribeConfig = {
// API endpoint
apiBaseUrl: 'https://api.insightmediagroup.io',
// Typography
font: "'Inter', -apple-system, sans-serif",
// Colors
colors: {
primary: "#6366f1", // Main brand color (buttons, links)
text: "#1e293b", // Main text color
textMuted: "#64748b", // Secondary text color
border: "#e2e8f0", // Border color
background: "#ffffff" // Background color
},
// Images
images: {
logo: "https://example.com/logo.png",
promo: "https://example.com/promo.jpg"
},
// Event callbacks
callbacks: {
onSuccess: (data) => console.log('Form submitted:', data),
onClose: () => console.log('Modal closed'),
onError: (error) => console.error('Error:', error)
}
};
</script>
<script src="https://unpkg.com/@insight-media-group/imgjs"></script>
<!-- Load the script -->
<script src="https://unpkg.com/@insight-media-group/imgjs"></script>
<!-- Configure after loading -->
<script>
imgjs.subscribe.config({
// Configuration options...
});
</script>
// If using ES modules
import '@insight-media-group/imgjs';
// The module will automatically attach to window.imgjs.subscribe
imgjs.subscribe.config({
// API endpoint
apiBaseUrl: 'https://api.insightmediagroup.io',
// Typography
font: "'Inter', -apple-system, sans-serif",
// Colors
colors: {
primary: "#6366f1", // Main brand color (buttons, links)
text: "#1e293b", // Main text color
textMuted: "#64748b", // Secondary text color
border: "#e2e8f0", // Border color
background: "#ffffff" // Background color
},
// Images (URLs are automatically sanitized)
images: {
logo: "https://example.com/logo.png",
promo: "https://example.com/promo.jpg"
},
// Event callbacks
callbacks: {
onSuccess: (data) => console.log('Form submitted:', data),
onClose: () => console.log('Modal closed'),
onError: (error) => console.error('Error:', error)
}
});
// Open with empty email field
imgjs.subscribe.open();
// Open with pre-filled email
imgjs.subscribe.open('user@example.com');
// Remove modal, event listeners, and clear state
imgjs.subscribe.destroy();
npm install
npm run dev
npm run build
⚠️ Development Server Notice
The included development server (mock-server.js) is for local testing only and should NEVER be used in production. It provides:
For production, always use your own API endpoint by setting apiBaseUrl in the configuration.
The module includes a configuration tester in the development environment that allows real-time testing of:
Test error scenarios using special email addresses:
error@example.com - Triggers a server errortimeout@example.com - Simulates a timeoutfail@example.com - Triggers a validation errorMemory Management
destroy() when the module is no longer neededError Handling
Security
Performance
ISC
FAQs
IMGJS Subscribe Module - Email subscription and profile enrichment component
The npm package imgjs-subscribe-module receives a total of 2 weekly downloads. As such, imgjs-subscribe-module popularity was classified as not popular.
We found that imgjs-subscribe-module 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.