Get images

@return array
336346
public function getImages()
    {
        $enclosures = $this->entry->get_enclosures();
        // TODO: is this all?
        $imageTypes = array('image/jpeg', 'image/jpe', 'image/jpg', 'image/png', 'image/gif');
        $images = array();

        foreach ($enclosures as $enclosure) {

            if ($enclosure->get_medium() == 'image' || in_array($enclosure->get_type(), $imageTypes)) {

                // Filter owners and photographers
                $credits = $enclosure->get_credits();
                $owners = array();
                $photographers = array();
                if (is_array($credits)) {
                    foreach ($credits as $credit) {

                        if ($credits->getRole() == 'owner') {
                            $owners[] = $this->decodeString($credit->get_name());
                        } elseif ($credits->getRole() == 'photographer') {
                            $photographers[] = $this->decodeString($credit->get_name());
                        }
                    }
                }

                $images[] = array(
                    'location' => $enclosure->get_link(),
                    'description' => $this->decodeString(($enclosure->get_caption() != '') ?: $enclosure->get_title()),
                    'copyright' => $this->decodeString($enclosure->get_copyright()),
                    'photographer' => implode(', ', $photographers)
                );
            }
        }

        return $images;
    }
441221
public function getImageAttributes()
    {
        $attributes = [
            'src' => $this->ImageURL,
            'class' => $this->ImageClass,
            'title' => $this->ImageTitleText,
            'alt' => $this->ImageAltText
        ];
        
        if ($this->hasVectorImage()) {
            
            if ($width = $this->ImageResizeWidth) {
                $attributes['width'] = $width;
            }
            
            if ($height = $this->ImageResizeHeight) {
                $attributes['height'] = $height;
            }
            
        }
        
        $this->extend('updateImageAttributes', $attributes);
        
        return $attributes;
    }
1326010
public function fetchImages()
    {
        try {
            $api_client = new Client();
            $list = $api_client->getImagesByArticles($this->HailID);
        } catch (\Exception $ex) {
            return;
        }

        $hailIdList = [];

        // Clean before importing
        $this->ImageGallery()->removeAll();

        foreach ($list as $hailData) {
            // Build up Hail ID list
            $hailIdList[] = $hailData['id'];

            // Check if we can find an existing item.
            $hailObj = Image::get()->filter(['HailID' => $hailData['id']])->First();

            if (!$hailObj) {
                $hailObj = new Image();
            }
            $hailObj->OrganisationID = $this->OrganisationID;
            $hailObj->HailOrgID = $this->HailOrgID;
            $hailObj->HailOrgName = $this->HailOrgName;

            $hailObj->importHailData($hailData);
            $this->ImageGallery()->add($hailObj);
        }
    }
1090331
public function getImages()
    {
        $images = array();
        $image = $this->getImage();
        if (!empty($image)) {
            $images[$image] = $image;
        }

        $screenshotsPath = $this->getFilePath().self::SCREENSHOT_PATH;
        $files = array();
        if (is_dir($screenshotsPath)) {
            $files = scandir($screenshotsPath);
        }

        foreach ($files as $file) {
            $ext = pathinfo($file, PATHINFO_EXTENSION);
            if ($ext === 'gif' || $ext === 'jpg' || $ext === 'png') {
                $images['/theme/images/screenshots/'.$file] = '/theme/images/screenshots/'.$file;
            }
        }


        return $images;
    }
193336
public function getAllImageFormats()
    {
        if ($this->allImageFormats === null) {
            $this->allImageFormats = [
                static::FORMAT_PNG,
                static::FORMAT_JPEG,
                static::FORMAT_GIF,
                static::FORMAT_WBMP,
                static::FORMAT_XBM,
            ];
        }

        return $this->allImageFormats;
    }
319686
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;
    }
764817
public function images()
    {
        foreach($this->data as $post)
        {
            $post->images = Post::images($post->ID);
        }

        return $this;
    }
346950
private function getImages()
    {
        $photos = $this->event->get('photo');
        $largetstPhoto = array_pop($photos);
        $response = $this->http->get($this->buildApiUrl('getFile'), [
            'file_id' => $largetstPhoto['file_id'],
        ]);

        $responseData = json_decode($response->getContent());

        if ($response->getStatusCode() !== 200) {
            throw new TelegramAttachmentException('Error retrieving file url: '.$responseData->description);
        }

        $url = $this->buildFileApiUrl($responseData->result->file_path);

        return [new Image($url, $largetstPhoto)];
    }
33050
public static function getImageList() {
        if (self::$_image) {
            return self::$_image;
        }

        self::$_image = self::_getList('image');

        return self::$_image;
    }
697403
public function getImagesArray()
    {
        if ($this->_imagesArray === null) {
            $this->_imagesArray = $this->getQueryCacheHelper((new Query())->from('{{%admin_storage_image}}')->select(['id', 'file_id', 'filter_id', 'resolution_width', 'resolution_height'])->indexBy('id'), self::CACHE_KEY_IMAGE);
        }

        return $this->_imagesArray;
    }
12175
public function getImageInfos()
    {
        if (!$this->exists()) {
            return false;
        }
        $data = getimagesize($this->getRealPath());
        $result = array();
        if (!empty($data)) {
            if (!empty($data[0])) {
                $result['width'] = $data[0];
            }
            if (!empty($data[1])) {
                $result['height'] = $data[1];
            }
            if (!empty($data[2])) {
                $result['type'] = $data[2];
            }
            if (!empty($data[3])) {
                $result['style'] = $data[3];
            }
            if (!empty($data['channels'])) {
                $result['channels'] = $data['channels'];
                if ($data['channels']===3) {
                    $result['colors'] = 'RGB';
                }
                if ($data['channels']===4) {
                    $result['colors'] = 'CMYK';
                }
            }
            if (!empty($data['mime'])) {
                $result['mime'] = $data['mime'];
            }
            if (!empty($data['bytes'])) {
                $result['bytes'] = $data['bytes'];
            }
        }
        return $result;
    }
1291848
public function getData()
    {
        $result = [
            'content_type' => $this->type
        ];

        switch($this->type)
        {
            case self::TYPE_LOCATION:
                $result['image_url'] = $this->image_url;
                break;

            case self::TYPE_TEXT:
                $result['payload'] = $this->payload;
                $result['title'] = $this->title;
                $result['image_url'] = $this->image_url;
                break;
                
            case self::TYPE_USER_PHONE_NUMBER:
                $result['payload'] = $this->payload;
                break;
                
            case self::TYPE_USER_EMAIL:
                $result['payload'] = $this->payload;
                break;
        }

        return $result;
    }
1234554
def get_images(self, limit=None):
        """"""
        url = (self._imgur._base_url + "/3/account/{0}/"
               "images/{1}".format(self.name, '{}'))
        resp = self._imgur._send_request(url, limit=limit)
        return [Image(img, self._imgur) for img in resp]
1260782
public static function images()
    {
        // Helper Class Exists
        if (isset(self::$ImagesHelper)) {
            return self::$ImagesHelper;
        }
        // Initialize Class
        self::$ImagesHelper = new ImagesHelper();
        // Return Helper Class
        return self::$ImagesHelper;
    }
9962
public function getImagesUrls()
    {
        return Collection::make($this->event->get('attachments'))->where('contentType', 'image')->map(function ($item) {
            return new Image($item['contentUrl'], $item);
        })->toArray();
    }
1273312
public function getPaginatedGalleryImages() {

        $getGalleryImages = $this->GalleryImages()->sort('SortOrder DESC');
        $getRequest = $this->getRequest();

        $paginatedGalleryImages = PaginatedList::create(
            $getGalleryImages,
            $getRequest
        )->setPageLength(12);

        return $paginatedGalleryImages;

    }
1270045
public function getImage()
    {
        $value = parent::getValue();
        
        if ($value) {
            return Yii::$app->storage->getImage($value);
        }
        
        return false;
    }