code: public function getBackendIcon($icon, $defaultIcon = 'bundles/metamodelscore/images/icons/metamodels.png')
      {
          $realIcon   = $this->convertValueToPath($icon, $defaultIcon);
          $targetPath = $this->outputPath . '/' . basename($realIcon);
          if (\file_exists($targetPath)) {
              return $this->webPath . '/' . basename($realIcon);
          }
  
          $this->imageFactory->create($realIcon, [16, 16, 'center_center'], $targetPath);
  
          return $this->webPath . '/' . basename($realIcon);
      }
docs: Get a 16x16 pixel resized icon of the passed image if it exists, return the default icon otherwise.
  
  @param string $icon        The icon to resize.
  @param string $defaultIcon The default icon.
  
  @return string