protected function applyCustomCropping($thumbConfig)
{
$cropConfig = ["width" => $this->cropWidth, "height" => $this->cropHeight, "y" => $this->cropTop, "x" => $this->cropLeft];
$thumbConfig->addItemAt(0, "cropPercent", $cropConfig);
// also crop media query specific configs
if ($thumbConfig->hasMedias()) {
foreach ($thumbConfig->getMedias() as $mediaName => $mediaItems) {
$thumbConfig->addItemAt(0, "cropPercent", $cropConfig, $mediaName);
}
}
}