public function reprocess($variants = ['*'])
    {
        if ( ! $this->exists()) {
            return;
        }

        // There is no need to change the original here (that would even be unnecessarily risky),
        // so we just need to reprocess each variant separately, based on the original content.
        if (in_array('*', $variants)) {
            $variants = $this->variants();
        }

        $source = $this->getStorableFileFactory()->makeFromUrl(
            $this->url(),
            $this->originalFilename(),
            $this->contentType()
        );

        // Collect information about variants to update the variant information with after processing.
        $variantInformation = [];

        foreach ($variants as $variant) {
            $this->processSingleVariant($source, $variant, $variantInformation);
        }

        if ($this->shouldVariantInformationBeStored()) {
            $this->instanceWrite('variants', json_encode($variantInformation));
            $this->instance->save();
        }
    }
public function reprocess($variants = ['*'])
    {
        if ( ! $this->exists()) {
            return;
        }

        // There is no need to change the original here (that would even be unnecessarily risky),
        // so we just need to reprocess each variant separately, based on the original content.
        if (in_array('*', $variants)) {
            $variants = $this->variants();
        }

        $source = $this->getStorableFileFactory()->makeFromUrl(
            $this->url(),
            $this->originalFilename(),
            $this->contentType()
        );

        // Collect information about variants to update the variant information with after processing.
        $variantInformation = [];

        foreach ($variants as $variant) {
            $this->processSingleVariant($source, $variant, $variantInformation);
        }

        if ($this->shouldVariantInformationBeStored()) {
            $this->instanceWrite('variants', json_encode($variantInformation));
            $this->instance->save();
        }
    }
public function reprocess ( $ variants = [ '*' ] ) { if ( ! $ this -> exists ( ) ) { return ; } // There is no need to change the original here (that would even be unnecessarily risky), // so we just need to reprocess each variant separately, based on the original content. if ( in_array ( '*' , $ variants ) ) { $ variants = $ this -> variants ( ) ; } $ source = $ this -> getStorableFileFactory ( ) -> makeFromUrl ( $ this -> url ( ) , $ this -> originalFilename ( ) , $ this -> contentType ( ) ) ; // Collect information about variants to update the variant information with after processing. $ variantInformation = [ ] ; foreach ( $ variants as $ variant ) { $ this -> processSingleVariant ( $ source , $ variant , $ variantInformation ) ; } if ( $ this -> shouldVariantInformationBeStored ( ) ) { $ this -> instanceWrite ( 'variants' , json_encode ( $ variantInformation ) ) ; $ this -> instance -> save ( ) ; } }
Reprocesses variants from the currently set original file.

@param array $variants   ['*'] for all
@throws VariantProcessFailureException
Reprocesses variants from the currently set original file .