-
Notifications
You must be signed in to change notification settings - Fork 323
[feature] (provider/directus) Add Sharp transforms to modifiers, add support for keyed transforms #2194
Copy link
Copy link
Open
Description
The current implementation of Directus Transforms is not typed appropriately, and not checked against any available functions. Directus uses Sharp on the backend, but not all functions work. There is also no implementation of the keyed transform option available in Directus.
The proposed enhancement should consider:
- (feature): Support for Keyed Transforms using the
keystring, stripping all other transforms supported by Nuxt/Image- (test): Ensure that
keyif present is not paired with other modifiers. - (playground): Identify Directus instance that has pre-configured
keys in the public space for better explanation to developers.- Option 1: https://sandbox.directus.io using
key=800workey=1200w. (customized transforms) - Option 2: using
key=system-[small/medium/large]-[cover/contain]
- Option 1: https://sandbox.directus.io using
- (test): Ensure that
- (feature): Transforms should have typing for Image Operations, Color Manipulation, and Channel Manipulation as supported by Sharp.
- (fix): The current transforms are typed as
string[]which is not valid. Transforms should fallback to a tuple of type[string, ...any[]][]to prevent errors with using transforms not typed explicitly. (Future proofing for new transforms added to Sharp & supported by Directus.) - (docs): Update Docs ->
- Provide a note that
keyrequires setup in Directus. (Not actually true, see comment below) - Explicitly name Sharp Transforms that are supported (and link to details in Sharp Library)
- Provide a note that
I don't think this will break anything for existing users.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels