return the primary image object of the shop article. this is either the cms_media_default_preview_image_id
or the  first image in the image list.

@return TdbShopArticleImage
507257
public function GetPrimaryImage()
    {
        $oPrimaryImage = &$this->GetFromInternalCache('oPrimaryImage');
        if (is_null($oPrimaryImage)) {
            if (!empty($this->fieldCmsMediaDefaultPreviewImageId) && (!is_numeric($this->fieldCmsMediaDefaultPreviewImageId) || intval($this->fieldCmsMediaDefaultPreviewImageId) > 1000)) {
                $oShop = TdbShop::GetInstance();
                $aData = array('shop_article_id' => $this->id, 'cms_media_id' => $this->fieldCmsMediaDefaultPreviewImageId, 'position' => 1);
                $oPrimaryImage = TdbShopArticleImage::GetNewInstance();
                $oPrimaryImage->LoadFromRow($aData);
            } else {
                $oImages = &$this->GetFieldShopArticleImageList();
                $activePage = $this->getActivePageService()->getActivePage();
                if (0 == $oImages->Length() && (!is_null($activePage))) {
                    $oShop = TdbShop::GetInstance();
                    $aData = array('shop_article_id' => $this->id, 'cms_media_id' => $oShop->fieldNotFoundImage, 'position' => 1);
                    $oPrimaryImage = TdbShopArticleImage::GetNewInstance();
                    $oPrimaryImage->LoadFromRow($aData);
                } else {
                    $oImages->GoToStart();
                    $oPrimaryImage = &$oImages->Current();
                }
            }

            if (false === $oPrimaryImage) {
                $oPrimaryImage = null;
                if ($this->IsVariant()) {
                    $oParent = $this->GetFieldVariantParent();
                    if (null != $oParent) {
                        $oPrimaryImage = $oParent->GetPrimaryImage();
                    }
                }
            }
            $this->SetInternalCache('oPrimaryImage', $oPrimaryImage);
        }

        return $oPrimaryImage;
    }
375790
public function getImageType()
    {
        $this->imageType = ($this->imageType === 'jpg') ? 'jpeg' : $this->imageType;
        $this->imageType = ( in_array($this->imageType, $this->imageTypes) ) ? $this->imageType : 'png';

        return $this->imageType;
    }
351314
public function getImages()
    {
        // Sort array
        $images = array();
        if (isset($this->headerFooterImages[self::IMAGE_HEADER_LEFT])) {
            $images[self::IMAGE_HEADER_LEFT] =         $this->headerFooterImages[self::IMAGE_HEADER_LEFT];
        }
        if (isset($this->headerFooterImages[self::IMAGE_HEADER_CENTER])) {
            $images[self::IMAGE_HEADER_CENTER] =     $this->headerFooterImages[self::IMAGE_HEADER_CENTER];
        }
        if (isset($this->headerFooterImages[self::IMAGE_HEADER_RIGHT])) {
            $images[self::IMAGE_HEADER_RIGHT] =     $this->headerFooterImages[self::IMAGE_HEADER_RIGHT];
        }
        if (isset($this->headerFooterImages[self::IMAGE_FOOTER_LEFT])) {
            $images[self::IMAGE_FOOTER_LEFT] =         $this->headerFooterImages[self::IMAGE_FOOTER_LEFT];
        }
        if (isset($this->headerFooterImages[self::IMAGE_FOOTER_CENTER])) {
            $images[self::IMAGE_FOOTER_CENTER] =     $this->headerFooterImages[self::IMAGE_FOOTER_CENTER];
        }
        if (isset($this->headerFooterImages[self::IMAGE_FOOTER_RIGHT])) {
            $images[self::IMAGE_FOOTER_RIGHT] =     $this->headerFooterImages[self::IMAGE_FOOTER_RIGHT];
        }
        $this->headerFooterImages = $images;

        return $this->headerFooterImages;
    }
361696
public function Image()
    {
        $product = $this->FindStockItem();

        if ($product && method_exists($product, "SortedImages")) {
            return  $product->SortedImages()->first();
        } elseif ($product && method_exists($product, "Images")) {
            return $product->Images()->first();
        } elseif ($product && method_exists($product, "Image") && $product->Image()->exists()) {
            return $product->Image();
        }
    }
241640
public function getImageUrl()
    {
        if(array_key_exists(self::ITEM_IMAGE_URL, $this->_itemData)) {
            return (string) $this->_itemData[self::ITEM_IMAGE_URL];
        }
        return null;
    }
42960
public function getImage()
    {
        $this->imageWidth = null;
        $this->imageHeight = null;

        $images = $this->images;
        $bigger = (bool) $this->getConfig('choose_bigger_image');
        $minWidth = $this->getConfig('min_image_width', 1);
        $minHeight = $this->getConfig('min_image_height', 1);

        $images = array_filter($images, function ($image) use ($minWidth, $minHeight) {
            return $image['width'] >= $minWidth && $image['height'] >= $minHeight;
        });

        if (empty($images)) {
            return null;
        }

        reset($images);
        $image = current($images);

        if ($bigger) {
            $sizes = [];

            foreach ($images as $img) {
                $sizes[$img['url']] = $img['size'];
            }

            $biggest = static::getBigger($sizes);

            foreach ($images as $img) {
                if ($biggest == $img['url']) {
                    $image = $img;
                    break;
                }
            }
        }

        $this->imageWidth = $image['width'];
        $this->imageHeight = $image['height'];

        return $image['url'];
    }
492868
public com.google.api.ads.admanager.axis.v201805.CreativeAsset getPrimaryImageAsset() {
        return primaryImageAsset;
    }
163998
public function getFirstArticle()
    {
        if ($this->_oFirstArticle === null) {
            $this->_oFirstArticle = false;
            if ($this->_getLoadActionsParam()) {
                // top articles ( big one )
                $oArtList = oxNew(\OxidEsales\Eshop\Application\Model\ArticleList::class);
                $oArtList->loadActionArticles('OXFIRSTSTART');
                if ($oArtList->count()) {
                    $this->_oFirstArticle = $oArtList->current();
                }
            }
        }

        return $this->_oFirstArticle;
    }
803489
public function getDefaultImageAlignment()
    {
        if ($alignment = $this->owner->ImageDefaultAlignment) {
            return $alignment;
        }
        
        if ($this->owner->hasExtension(MetaDataExtension::class)) {
            return $this->owner->getFieldFromParent('DefaultImageAlignment');
        }
    }
889911
public function getFeaturedImage()
    {
        if ($this->featuredImage === null) {
            if ($imgId = get_post_thumbnail_id((int) $this->getId())) {
                $this->featuredImage = $this->postFactory->create(get_post($imgId));
            } else {
                $this->featuredImage = false;
            }
        }

        return $this->featuredImage;
    }
311711
protected function getPreviewImageSource()
    {
        $imageName = $this->getViewFileName('jpg');
    
        $reflector = new \ReflectionClass($this);
        $dirPath = dirname($reflector->getFileName(), 2);
        $imagePath = $dirPath . '/images/blocks/' . $imageName;
        // file get content resolved Yii aliases.
        $data = FileHelper::getFileContent($imagePath);
        if ($data) {
            return 'data:image/jpg;base64,' . base64_encode($data);
        }
        
        return false;
    }
274700
public function get_thumbnail()
	{
		if (!isset($this->data['thumbnail']))
		{
			if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'thumbnail'))
			{
				$this->data['thumbnail'] = $return[0]['attribs'][''];
			}
			else
			{
				$this->data['thumbnail'] = null;
			}
		}
		return $this->data['thumbnail'];
	}
913625
private function getPreviewObject()
    {
        $optimizer       = $this->getOptimizer();
        $pageSize        = $this->getPageSize();
        $queryText       = $this->getQueryText();
        $category        = $this->getCategory();
        $containerConfig = $this->getContainerConfiguration();

        return $this->previewModelFactory->create(
            [
                'optimizer'       => $optimizer,
                'containerConfig' => $containerConfig,
                'category'        => $category,
                'queryText'       => $queryText,
                'size'            => $pageSize,
            ]
        );
    }
584563
public function thumbnail()
    {
        if (is_null($thumbnailURL = $this->entity->getImagePath()))
        {
            return $this->iconThumbnail('document');
        }

        return $this->wrapThumbnail(
            $this->filteredImageWith('rthumb', 'document-thumbnail__image')
        );
    }
147724
public function img()
    {
        // Check for an existing Image relation
        if (($image = $this->parentImg($this->inputName()))
            && $image->exists) {

            // If the Image represents a default image, but doesn't match the current
            // item from the config, trash the current one and build the new default
            // image.
            if ($replacement = $this->getReplacementImage($image)) {
                return $replacement;
            }

            // Return the found image
            return $image;
        }

        // Else return a default image
        return $this->defaultImage();
    }
1289048
public function getSmallestImageSet()
    {
        $imageSet = $this->getImageSet();

        $returnSize = PHP_INT_MAX;
        $returnSet = null;

        foreach ($imageSet as $set) {
            $size = $set->width * $set->height;
            if ($size < $returnSize) {
                $returnSize = $size;
                $returnSet = $set;
            }
        }

        if ($returnSet === null) {
            $returnSet = new \stdClass();
            $returnSet->slug = 'original';
        }

        return $returnSet;
    }
739850
public function getShopLogoUrl()
    {
        $imagePath = $this->getImageUrl();
        $resizedImagePath = $this->getResizedImageUrl();

        if ($this->getResize()) {
            $shopLogoPath = $resizedImagePath;

            if (!$this->fileExists($resizedImagePath)) {
                if (!$this->resizeImage()) {
                    // fallback to original image if can not be resized
                    $shopLogoPath = $imagePath;
                }
            }
        } else {
            $shopLogoPath = $imagePath;
        }

        return $shopLogoPath;
    }