ImageResize
https://github.com/magesuite/image-resize
This module contains helpers for image resize.
Â
Installation
This module is required by magesuite-cms-tag-manager
and magesuite-image-lazy-resize
, which are part of core package
Â
Installation if metapackage is not used:
composer require "creativestyle/magesuite-image-resize" ^1.0.0
Admin settings
There is no admin setting for this module.
Backend
Backend documentation need to be added
Example of usage in magesuite-cms-tag-manager/Service/Mapper/CmsPageDataMapper.php
public function mapPage($page)
{
$imageUrl = '';
if ($page->getCmsImageTeaser()) {
$imageUrl = $this->imageResize->getUrl($page->getCmsTeaserImageUrl(), self::CMS_TEASER_MODULE, self::CMS_TEASER_IMAGE_ID);
}
$pagesData = [
'id' => $page->getId(),
'headline' => $page->getTitle(),
'href' => $this->cmsPageHelper->getPageUrl($page->getId()),
'image' => [
'src' => $imageUrl,
'srcSet' => $imageUrl ? $this->imageResize->resolveSrcSet($page->getCmsTeaserImageUrl(), self::CMS_TEASER_MODULE, [self::CMS_TEASER_IMAGE_ID, self::CMS_TEASER_IMAGE_ID_2X]) : ''
],
'displayVariant' => 2
];
return $pagesData;
}
Frontend
There are no frontend features in this module.
Â
Â
Â