Add ability to sync assets referenced by CSS files.

Created on 20 May 2016, almost 9 years ago
Updated 8 January 2025, 3 months ago

Not sure if we even want to do this, or how successful we can make it.

Brain dump:
During CSS aggregation, each file referenced via url() is examined. This gives us the opportunity to push each file to the appropriate stream wrapper. Testing needs to be done to see how slow this is. With caching, it might be slow once, but not too bad on subsequent aggregations. Possibly, provide a configuration option, with a default, for what subdirectory to sync to.

I believe that aggregations are already locked, so it should be simpler than dealing with image styles.

It might be useful to empty the asset directory before starting this, since assets can change. A before and after diff could also be used to see what files exist that are no longer referenced. I'm not sure how this can work with multiple aggregates.

✨ Feature request
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States twistor

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States lhridley

    Closing as outdated. Drupal Core now has the "assets" streamwrapper to manage CSS / JS assets for a site, which theoretically can be overridden to utilize a Flysystem adapter to leverage an alternate storage mechanism for css / js assets, separately from uploaded assets like images, docs, etc.

Production build 0.71.5 2024