nuxt-tiff-provider

Nuxt module: render TIFFs via @nuxt/image off the main thread in a Service Worker.
839 1
Install
npm install nuxt-tiff-provider
Latest Version:0.4.0
Vue:3
License:MIT
Last Updated:Oct 15, 2026
Links: GitHub  ·  npm
Maintainer: bigsan

nuxt-tiff-provider

Render TIFF images in any browser through @nuxt/image, transcoding TIFF → WebP off the main thread in a Service Worker.

Install

pnpm add nuxt-tiff-provider
// nuxt.config.ts — do NOT also list @nuxt/image; this module installs it.
export default defineNuxtConfig({
  modules: ['nuxt-tiff-provider'],
})

Use

<NuxtImg provider="tiff" src="/photo.tif" width="640" sizes="100vw md:640px" />

Options

export default defineNuxtConfig({
  tiff: {
    providerName: 'tiff',      // <NuxtImg provider="...">
    cacheName: 'tiff-webp-v1', // Cache API bucket
    quality: 0.8,              // default WebP quality 0..1
    scope: '/',                // Service Worker scope
    autoRegister: true,        // false → call registerTiffServiceWorker() yourself
    retryRacedImages: true,    // re-fetch images that raced the SW on first load
    paramPrefix: 'tp',         // query-param namespace + interception marker
    ignoreNativeTiff: false,   // true → transcode in Safari too, skip native passthrough
  },
})

Notes

  • Safari paints TIFF natively; the SW detects this and passes through. Set ignoreNativeTiff: true to transcode there too.
  • First cold visit: images requested before the SW took control are re-fetched automatically once it does (disable with retryRacedImages: false).
  • Already run your own Service Worker? Set autoRegister: false and importScripts('/tiff-sw.js') inside it (see @tiff-provider/core).
  • Sources must be same-origin or CORS-readable (cross-origin needs CORS headers).
  • The SW intercepts by the tp=1 marker the provider adds, not by file extension, so extension-less sources (e.g. an S3 key served as TIFF via Content-Type) work too. Building a URL by hand? Add the marker with buildTiffUrl or ?tp=1.

Related Packages

nuxt-image-extractor

Nuxt image extractor for full static generated sites

2,195 29
@attributech/nuxt-drupal-image

Nuxt module for handling Drupal image styles

1,386 0
@scayle/nuxt-image-provider

An image provider to handle SCAYLE-specific modifiers

99,945
@teamnovu/nuxt-image-module

Responsive image module for Nuxt 4 with provider-agnostic focal-point handling a...

1,124
@privyid/nuxt-csrf

Module CSRF for NUXT

26,088 9

Version History

Version Released Vue License
0.4.0 ^3.0 MIT
0.3.2 ^3.0 MIT
0.3.0 ^3.0 MIT
0.2.0 ^3.0 MIT
0.1.0 ^3.0 MIT