Include the featured image URLs in the post object.

@return Ultra\Mutator\Mutator The mutated data object
764817
public function images()
    {
        foreach($this->data as $post)
        {
            $post->images = Post::images($post->ID);
        }

        return $this;
    }
940265
protected function image_element_original() {
    $path = $this->get_original_image_path();
    $class = $this->get_class();

    $data['src'] = $this->generateUrl($path);
    $data['img'] = '<img src="'. $data['src'] .'"'. $class .' alt="'. $this->alt .'" title="'. $this->title .'"/>';
    $data['img_nosize'] = '<img src="'. $data['src'] .'"'. $class .' alt="'. $this->alt .'" title="'. $this->title .'"/>';

    return (object) $data;
  }
993665
protected function getImageUrlOrDefault()
    {
        $file = '';

        if (is_object($this->entity->image)) {
            $file = $this->entity->image->path;
        }

        if (!Storage::exists($file)) {
            $file = $this->imgNotFound();
        }

        return Storage::url($file);
    }
688051
public function getImages()
    {
        $images = array();

        $nodes = $this->html->findTags('img');
        foreach ($nodes as $node) {
            $source = trim($node->getAttribute('src'));

            if (empty($source)) {
                continue;
            }

            $url = $this->getAbsoluteUrl($source);
            $size = $this->getImageSize($url);

            if (is_array($size)) {
                list($width, $height) = $size;
            } else {
                continue;
            }

            if ($this->isImageAccepted($url, $width, $height)) {
                $images[] = array(
                    'url'    => $url,
                    'width'  => $width,
                    'height' => $height,
                    'area'   => ($width * $height)
                );
            }
        }

        return $images;
    }
725766
public function PinterestShareLink()
    {
        $pinImage = ($this->owner->hasMethod('getPinterestImage')) ? $this->owner->getPinterestImage() : $this->owner->getOGImage();
        if ($pinImage) {
            // OGImage may be an Image object or an absolute URL
            $imageURL = rawurlencode((is_string($pinImage)) ? $pinImage : $pinImage->getAbsoluteURL());
            $pageURL = rawurlencode($this->owner->AbsoluteLink());
            $description = rawurlencode($this->owner->getOGTitle());
            // Combine Title, link and image in to rich link
            return "http://www.pinterest.com/pin/create/button/?url=$pageURL&media=$imageURL&description=$description";
        }

        return false;
    }
975724
public function toUrl()
    {
        $post_data = $this->toPostData();
        $out = $this->getNormalizedHttpUrl();
        if ($post_data) {
            $out .= '?'.$post_data;
        }
        return $out;
    }
1135766
public function src()
    {
        $src = $this->thumbnail();

        if (!$src) {
            $src = $this->file();
        }

        return $this->createAbsoluteUrl($src);
    }
693199
public function getCMSFields()
    {
        // Obtain Field Objects (from parent):
        
        $fields = parent::getCMSFields();
        
        // Insert Image Tab:
        
        $fields->insertAfter(
            Tab::create(
                'Image',
                $this->fieldLabel('Image')
            ),
            'Main'
        );
        
        // Create Image Fields:
        
        $fields->addFieldsToTab(
            'Root.Image',
            [
                FieldSection::create(
                    'LinkImage',
                    $this->fieldLabel('LinkImage'),
                    [
                        $image = UploadField::create(
                            'LinkImage',
                            $this->fieldLabel('LinkImageFile')
                        ),
                        ViewportsField::create(
                            'LinkImageWidth',
                            $this->fieldLabel('LinkImageWidth')
                        )->setUseTextInput(true),
                        ViewportsField::create(
                            'LinkImageHeight',
                            $this->fieldLabel('LinkImageHeight')
                        )->setUseTextInput(true),
                        CheckboxField::create(
                            'InlineVector',
                            $this->fieldLabel('InlineVector')
                        )
                    ]
                )
            ]
        );
        
        // Define Image Field:
        
        $image->setAllowedExtensions(['gif', 'jpg', 'jpeg', 'png', 'svg']);
        $image->setFolderName($this->getAssetFolder());
        
        // Answer Field Objects:
        
        return $fields;
    }
836012
public function getImageData() {
        if ($this->imageData === null) {
            $this->imageData = $this->download($this->url);
        }
        return $this->imageData;
    }
115437
public function filterBestVotedImage()
    {
        $currentImage = null;
        $voteAverage  = -1;

        /**
         * @var $image Image
         */
        foreach ($this->data as $image) {
            if ($image->getVoteAverage() > $voteAverage) {
                $voteAverage  = $image->getVoteAverage();
                $currentImage = $image;
            }
        }

        return $currentImage;
    }
9962
public function getImagesUrls()
    {
        return Collection::make($this->event->get('attachments'))->where('contentType', 'image')->map(function ($item) {
            return new Image($item['contentUrl'], $item);
        })->toArray();
    }
835833
public function getMetaImageLink()
    {
        if ($this->owner->hasMetaImage()) {
            
            if ($renderer = $this->owner->Renderer) {
                
                switch ($renderer->ImageLinksTo) {
                    
                    case BaseListComponent::IMAGE_LINK_ITEM:
                        return $this->owner->getMetaLink();
                    
                }
                
            }
            
            return $this->owner->getMetaImageURL();
            
        }
    }
93298
public function generateRawData()
    {
        $rawData = ['id' => $this->getId()];
        $rawData['data'] = [];
        $rawData['data']['image'] = [];
        if ($this->getCreatedAt()) {
            $rawData['created_at'] = $this->getCreatedAt();
        }
        if ($this->getStatusDescription() || $this->getStatusCode()) {
            $rawData['status'] = $this->getStatus();
        }
        if ($this->getImage()) {
            $rawData['data']['image'][$this->getImageMethod()] = $this->getImage();
        }
        if ($this->getCrop()) {
            $rawData['data']['image']['crop'] = $this->getCrop();
        }
        if ($this->getConcepts()) {
            $rawData['data']['concepts'] = [];
            foreach ($this->getConcepts() as $concept) {
                $rawData['data']['concepts'][] = $concept->generateRawData();
            }
        }
        if ($this->getMetaData()) {
            $rawData['data']['metadata'] = $this->getMetaData();
        }

        return $rawData;
    }
827964
public function getImageResized()
    {
        if ($this->Image()->exists()) {
            $image = $this->Image();
        } elseif ($this->LinkPage()->hasMetaImage()) {
            $image = $this->LinkPage()->getMetaImage();
        }
        
        return $this->performImageResize($image);
    }
544066
public function getMetaImageLinkAttributes()
    {
        $attributes = [
            'href' => $this->owner->MetaImageLink,
            'class' => $this->owner->MetaImageLinkClass,
            'title' => $this->owner->MetaTitle
        ];
        
        if ($extra = Config::inst()->get(self::class, 'image_link_attributes')) {
            
            foreach ($extra as $name => $value) {
                
                // Process Attribute Value:
                
                $attributes[$name] = ViewTools::singleton()->processAttribute(
                    $value,
                    $this->owner,
                    $this->owner->Renderer
                );
                
            }
            
        }
        
        return $attributes;
    }
295698
private function getAdvancedUploadedImage()
    {
        if (! isset($this->advancedUplodedImage)) {
            $this->advancedUplodedImage = $this->makeAdvancedUploadedImage();
        }

        return $this->advancedUplodedImage;
    }
580628
public function disImageFiles()
    {
        $properties     = $this->getProperties();
        $acceptedFiles  = $properties['acceptedFiles'];
        $imagExt        = $this->getImageExtensionConstant();
        $acceptedFiles  = $this->rmAcceptedFiles($acceptedFiles, $imagExt);
        $properties['acceptedFiles']    = $acceptedFiles;
        $this->setProperties($properties);
        return $this;
    }