diff --git a/src/providers/ImagekitProvider.php b/src/providers/ImagekitProvider.php index 522c5b3..0c140fd 100644 --- a/src/providers/ImagekitProvider.php +++ b/src/providers/ImagekitProvider.php @@ -54,7 +54,7 @@ public function getUrl(array $source, Asset|string $asset, array $params): ?stri if ( ! is_string($asset) && $asset instanceof Asset) { $img = $asset->path; // Add a version hash based on the last modified date. - $revParams = \craft\helpers\Assets::revParams($asset); + $revParams['v'] = $asset->dateModified->getTimestamp(); } // Prefix img path with subfolder, if defined diff --git a/src/providers/ImgixProvider.php b/src/providers/ImgixProvider.php index 70e57c1..a872a90 100644 --- a/src/providers/ImgixProvider.php +++ b/src/providers/ImgixProvider.php @@ -35,7 +35,7 @@ public function getUrl(array $source, Asset|string $asset, array $params): ?stri if ( ! is_string($asset) && $asset instanceof Asset) { $img = $asset->path; // Add a version hash based on the last modified date. - $params = array_merge($params, \craft\helpers\Assets::revParams($asset)); + $params['v'] = $asset->dateModified->getTimestamp(); } // Prefix img path with subfolder, if defined