Inserted CSS isn't run through hook_file_url_alter

Created on 9 August 2023, 11 months ago
Updated 29 December 2023, 6 months ago

Problem/Motivation

On a site that uses hook_file_url_alter() to alter image and font urls in CSS, the critical CSS that this module inserts on the page isn't sent through that process.

Steps to reproduce

Use a critical CSS file that needs to run through hook_file_url_alter() and see that it does not.

Proposed resolution

When CSS preprocessing is enabled, use Drupal\Core\Asset\CssOptimizer->optimize() instead of directly using file_get_contents()

Remaining tasks

Review issue fork pull request.

User interface changes

N/A

API changes

N/A

Data model changes

N/A

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States pianomansam

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024