Custom Eleventy Plugins: Development, Testing & Optimization

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.

Development and maintenance of all types of websites:

Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Showing 1 of 1All 2062 services
Custom Eleventy Plugins: Development, Testing & Optimization
Medium
~2-3 days
Frequently Asked Questions

Our competencies:

Development stages

Latest works

  • image_website-b2b-advance_0.webp
    B2B ADVANCE company website development
    1358
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1250
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    956
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1188
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    929
  • image_bitrix-bitrix-24-1c_fixper_448_0.webp
    Website development for FIXPER company
    947

Custom Eleventy Plugin Development

Eleventy plugin development

A client once spent two weeks manually optimizing images during build — we wrote a custom Eleventy plugin in a day that automatically generates WebP and AVIF. After that project, we formalized the process and now offer turnkey custom Eleventy plugin development. Standard Eleventy gives a lot, but not everything: custom image processing, headless CMS integration, multilingual support — without a plugin, this turns into copy-pasta and fragile helpers. Our custom Eleventy plugin development service focuses on creating custom Eleventy plugins that are efficient and tailored. A custom Eleventy plugin provides reusable, testable logic that reduces development and maintenance time. Due to modularity, this approach scales easily: a plugin written once can be used in dozens of projects, saving hundreds of hours.

Common Challenges Addressed

Custom image processing with compression, multiple formats and sizes — up to 40% reduction in build size. In one project, we lowered the final site size from 150 MB to 90 MB just with the image plugin. This led to up to 30% savings on hosting, or roughly $200/month on a typical plan. For a client in the publishing industry, we built a plugin that reduced image payload by 60% and improved Lighthouse scores by 15 points. Integration with external APIs with caching and error handling — fetching products from a headless CMS. The plugin handles timeouts and retries, ensuring a stable build. Complex HTML transformations — removing unused styles, adding critical CSS, injecting metadata. This reduces page load time by 20% according to Lighthouse. Multilingual support with dynamic routes and locale in URLs — the plugin generates pages for each language, pulling translations from JSON.

Without a plugin, these tasks are handled by one-off scripts that are hard to maintain and test. A custom Eleventy plugin encapsulates the logic and can be reused in other projects.

How to Develop an Eleventy Plugin for Image Optimization?

Let's take a real case: an e-commerce site on Eleventy with hundreds of images. Need to generate WebP and AVIF, multiple sizes, with transparent PNG sources. We wrote a plugin based on @11ty/eleventy-img. In one project, build time dropped from 5 minutes to 2 minutes (a 60% reduction). We optimized 200+ images in under 30 seconds.

const Image = require("@11ty/eleventy-img");
const path = require("path");

module.exports = function(eleventyConfig, options = {}) {
  const cfg = {
    widths: [320, 640, 960, 1280, 1920],
    formats: ["avif", "webp", "jpeg"],
    outputDir: "./_site/assets/images/",
    urlPath: "/assets/images/",
    sharpOptions: { quality: 82 },
    ...options
  };

  eleventyConfig.addAsyncShortcode("img", async function(src, alt, sizes = "(max-width: 768px) 100vw, 1200px", classList = "") {
    const srcPath = src.startsWith("http") ? src : path.join("src", src);
    try {
      const metadata = await Image(srcPath, cfg);
      return Image.generateHTML(metadata, { alt, sizes, loading: "lazy", decoding: "async", class: classList });
    } catch (e) {
      console.warn(`[img] Error: ${src}`);
      return `<img src="${src}" alt="${alt}" loading="lazy">`;
    }
  });
};

The shortcode {% img "src", "alt" %} in templates generates a <picture> with AVIF, WebP, and JPG. The plugin replaced manual optimization and reduced build size by 40%. A similar approach can be applied to any repetitive tasks: from Markdown conversion to sitemap generation.

Testing a Custom Eleventy Plugin

Use Jest or Mocha for testing. Run Eleventy in test mode, passing the plugin configuration, and check output files. Also test individual plugin functions: filters, shortcodes, async operations. Example test for our plugin:

const plugin = require('./img-plugin');
const Eleventy = require('@11ty/eleventy');

test('generates picture with AVIF', async () => {
  const elev = new Eleventy('./test/src', './test/_site', {
    config: function(eleventyConfig) {
      eleventyConfig.addPlugin(plugin, { widths: [640] });
    }
  });
  const result = await elev.toJSON();
  expect(result[0].content).toContain('<picture>');
});

This ensures the plugin works correctly under changes. For complex plugins, add error handling tests: for example, when an external API is unreachable or an image is corrupted. Use mock objects to simulate network requests.

Custom Plugin vs Ready-Made: Performance Comparison

Ready-made plugins are often overloaded: include unnecessary features, are hard to configure, rarely updated. A custom plugin is written for a specific task, easier to maintain, and faster due to no dead code. For example, a ready-made image plugin may pull dependencies for formats you don't need, while a custom one includes only what's necessary. Comparison:

Feature Ready-made plugin Custom plugin
Functionality Bloated Only needed
Configuration Complex, many options Simple, your parameters
Performance Slower due to extra code Optimal (up to 3x faster)
Support Depends on author Full control

A custom Eleventy plugin is an investment in build speed and quality. With a custom plugin, you get tailored functionality and avoid unnecessary bloat.

Our Process

  1. Analysis: We review your current project, identify repetitive tasks.
  2. Design: We design the plugin API — input parameters, config, return values.
  3. Implementation: We write code with tests (Jest), using async/await, error handling.
  4. Testing: We run the build with the plugin, verify output files.
  5. Deployment: We integrate the plugin into your project, document usage.

What Is the Timeline and Cost?

Plugin Type Complexity Timeline Cost Range
Simple (filters, 2-3 shortcodes) Low 1-2 days from $500
Medium (async operations, images) Medium 3-5 days $1,200–$2,500
Complex (API, multilingual, tests, npm publish) High 1-2 weeks $3,000+

Cost is calculated individually. Typical ROI: one client saved $2,400/year on hosting after investing $1,500. Project estimation is free. Contact us — we'll find the best solution for your budget.

What's Included in the Result

  • Source code of the plugin with comments.
  • Installation and configuration documentation.
  • Tests (Jest) for key scenarios.
  • One week of support after deployment.

Common mistakes in plugin development: forgetting to handle errors in async shortcodes, not checking input parameter types, using synchronous operations where async is needed. Our process eliminates these.

We guarantee quality: over 10 years on the market, 40+ projects implemented. Get a free consultation — we'll discuss your project and propose an optimal solution. Budget savings and reduced maintenance time — that's what you get with a custom Eleventy plugin. Your benefit: lower hosting costs and faster development.

Learn more about the Eleventy API on GitHub.

Choosing a Site Type is a Technical Task, Not Marketing

We see teams waste budget on the wrong stack. A landing page on Next.js with static generation and a corporate site with CMS are fundamentally different infrastructures, even if they look similar. A mistake at the start leads to 5–10x higher hosting costs and slow loading speeds. Core Web Vitals (LCP, INP, TTFB) have different priorities for each site type. Below we break down four types of websites, their typical technical mistakes, and how we fix them.

How to Avoid Mistakes When Choosing a CMS?

Business Card Website

The most compact format: 1–5 pages, minimal dynamics. The main goal is to provide contact information and make a first impression. Technically not complex, but there are traps.

Stack too heavy. WordPress with 15 plugins for 5 pages gives 800ms TTFB on shared hosting. We propose static: HTML/CSS/JS or Next.js with output: 'export', deployed on Vercel or Cloudflare Pages. No PHP, no database — only CDN. TTFB < 50ms guaranteed. Hosting savings up to 50,000 ₽ per year.

No contact form with backend validation. A form with only JS validation is decoration. The backend must validate, rate-limit, and send notifications. For static sites we use Formspree or a serverless endpoint.

Missing Schema.org markup. Google Knowledge Panel relies on LocalBusiness or Organization markup — address, phone, hours. For a business card site this is critical. We embed it in the template.

Development time: 2–3 weeks with design. Order a turnkey development — we will evaluate your project in one day.

Why Does Landing Page Speed Directly Affect Conversion?

Landing Page

A landing page has one goal: conversion. Everything not leading to the target action is unnecessary. Core Web Vitals are critical here because of paid traffic, and Google uses CWV as a factor in Quality Score.

A specific case: a landing page with an 8MB hero video autoplay in MP4 without preload="none" + three third-party analytics scripts synchronously in <head>. LCP 9.4s, INP 780ms. We replaced the video with a poster image loaded lazily on scroll, moved scripts to async/defer and partially to Web Workers via Partytown. LCP 1.8s, INP 140ms. Conversion increased by 23% — solely due to speed, not design.

A/B testing is standard practice. Google Optimize shut down, but there are Growthbook (open source), PostHog, VWO. For Next.js we use edge middleware to distribute traffic at the CDN level without extra JS.

Timeline: 2–4 weeks. Contact us for a consultation — we will estimate timeline and budget in one day.

Corporate Website

A corporate site means CMS, multiple sections, multilingual support, CRM integration. The key question: who will edit the content and how often.

If editors are non-technical, a visual editor is needed. WordPress with Gutenberg or ACF Pro covers this. For complex structures — headless CMS (Strapi, Directus) with a frontend on Next.js. If the site updates infrequently — Markdown in Git with Astro or Next.js. Deploy on push to main — no CMS.

Performance. An "About Us" page with 40 original photos — LCP 12 seconds on mobile. Next.js <Image> component with WebP and srcset solves it without manual work.

Multilingual: Astrotomic Translatable on Laravel or next-intl / react-i18next. URL structure — /ru/about, /en/about with hreflang.

Timeline: 6–12 weeks depending on scope.

Promo Site

A promo site is temporary or permanent for a campaign. Non-standard design, animations, interactivity. Stack: GSAP, Framer Motion, Three.js, Lottie, Canvas API.

The main pitfall — animations that lag on mobile. GPU animations via transform and opacity are fine. box-shadow in animation, filter: blur() on every frame, animating width/height — causes 20fps on iPhone 12. will-change: transform helps pointwise.

Prefers-reduced-motion is mandatory for accessibility. We always add it.

Timeline: 3–6 weeks depending on complexity.

Comparison Table

Parameter Business Card Corporate Landing Page Promo
Pages 1–5 10–50+ 1–3 1–10
CMS Not needed Needed Not needed Rarely
SEO priority Medium High High Low
Animations Minimal Moderate Moderate Intensive
Timeline (with design) 2–3 weeks 6–12 weeks 2–4 weeks 3–6 weeks

Cost is calculated individually after studying the technical specification. Google recommends TTFB under 0.8s, ours is <0.2s.

What Does Our Work Include?

  • Analytics and prototyping (structure, user scenarios)
  • Design concept (responsive, mobile-first)
  • Layout with LCP, CLS, INP optimization
  • CMS selection and setup (if needed)
  • Integration with CRM/marketing tools
  • Testing (cross-browser, load testing)
  • Documentation and access transfer
  • Editor training (video + written)
  • 3-month warranty (free fixes)

Our Expertise

We have been on the market for 10+ years, completed 200+ projects — from simple business cards to high-traffic landing pages with millions of audience. Every project undergoes Core Web Vitals audit before release.

Second Table: Approach Comparison

Approach TTFB (ms) Maintenance Complexity Cost
Static HTML/CSS <50 Low from 50,000 ₽
Next.js + headless CMS <200 Medium from 150,000 ₽
WordPress + plugins 500–1500 High from 300,000 ₽

Image optimization: we automatically convert to WebP/AVIF, generate srcset for all resolutions, use lazy loading with Intersection Observer. For background images — progressive loading technique. This alone cuts page weight by 60–80%.

Contact us for a consultation on your project. Order turnkey development — we will estimate timeline and budget in one day.