Skip to content

Commit

Permalink
magento#1504: [2.1-develop] Insert rendition images to the content fr…
Browse files Browse the repository at this point in the history
…om media gallery instead of original images - static test suppress warning
  • Loading branch information
jmonteros422 committed Aug 17, 2020
1 parent acfb0f4 commit 84af1c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions MediaGalleryRenditions/Plugin/RemovePathOnExtract.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class RemovePathOnExtract
* @param ExtractAssetsFromContent $subject
* @param string $content
* @return array
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function beforeExecute(ExtractAssetsFromContent $subject, string $content): array
{
Expand Down
1 change: 1 addition & 0 deletions MediaGalleryRenditions/Plugin/SetPathOnInsert.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ public function aroundExecute(OnInsert $subject, callable $proceed): ResultInter
$this->imagesHelper->setStoreId($storeId);

if ($forceStaticPath) {
// phpcs:ignore Magento2.Functions.DiscouragedFunction
$image = parse_url($this->imagesHelper->getCurrentUrl() . $filename, PHP_URL_PATH);
} else {
$image = $this->imagesHelper->getImageHtmlDeclaration($filename, $asIs);
Expand Down

0 comments on commit 84af1c4

Please sign in to comment.