npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

directus-extension-auto-generate-file-transformations

v1.0.2

Published

Automatically generate your file transformations on upload

Downloads

165

Readme

🐰 Directus extension: Auto generate file transformations

💡 Automatically generate your file transformations on file upload. You can select which transformations should be created.

⚙ Settings

Select one or more of the transformation-preset. The extension will automatically show you all the available system-transformations as well as your own custom transformations. Once you upload or replace a file, the extension will automatically generate all the selected transformations for you.

CPU- & Memory-consumption

We request the transformations one after another in order to not take to much resources at once. But please still keep in mind that generating all transformations can still be quiet heavy, especially when you upload a lot of image and have a lot of presets selected. We recommend to only select the ones you mostly need.

Transformation-Presets with 'auto'-format

For transformations using 'auto' format (e.g system-transformations), AVIF versions are generated by this extension. This matches Directus primary format preference (in case avif is supported, directus will prefer avif for auto-formats).

Deleted Transformation-Presets

Once you delete a custom transformation, it will also be automatically removed from your selection.

⚙️ Installation

To install the extension, take a look at the Official Guide. After installation it will register the required settings-field on the next server-startup.

Installation via npm

npm i directus-extension-auto-generate-file-transformations

or

pnpm i directus-extension-auto-generate-file-transformations

Installation via marketplace

By default the marketplace won't show this extension as it's not sandboxed. Unfortunately the current state of sandboxed-extensions is too limited and wouldn't allow this extension to create and read the settings-fields.

However, you can force Directus Marketplace to show all extensions via the MARKETPLACE_TRUST environment variable:

MARKETPLACE_TRUST=all

Afterwards this extension can easily be installed through the in-build directus marketplace. Just go to settings -> marketplace and search for auto-generate-file-transformations.

❓ FAQ

Why should I use this extension?

By default directus will only generate the transformations on first reuquest. In some cases it might be useful to generate the versions directly after upload, for example:

  • Your website requires transformations and for max performance you don't want to wait with the generation until a visitor requests them
  • You upload a lot of files via API and then, when you visit the Directus Webapp, it takes a lot of time to load the images, as all tranformations still needs to be generated