/
ImageResize
ImageResize
GitHub - 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.
Related content
ImageOptimization
ImageOptimization
More like this
LazyResize
LazyResize
More like this
2.6. CMS Page Image Teaser
2.6. CMS Page Image Teaser
More like this
FileUpload
FileUpload
Read with this
Media
Read with this
CmsTagManger
CmsTagManger
More like this