Skip to content

Commit

Permalink
Fix image previews in SEOmatic link cards
Browse files Browse the repository at this point in the history
  • Loading branch information
croxton committed Feb 23, 2023
1 parent efe6c3b commit bca29e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/providers/ImagekitProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/providers/ImgixProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bca29e6

Please sign in to comment.