Neos.Media/Classes/Domain/Model/ImageVariant.php
public function initializeObject($initializationCause)
    {
        parent::initializeObject($initializationCause);
        if ($initializationCause === ObjectManagerInterface::INITIALIZATIONCAUSE_CREATED) {
            $this->renderResource();
        }
    }
public function initializeObject($initializationCause)
    {
        parent::initializeObject($initializationCause);
        if ($initializationCause === ObjectManagerInterface::INITIALIZATIONCAUSE_CREATED) {
            $this->renderResource();
        }
    }
public function initializeObject ( $ initializationCause ) { parent :: initializeObject ( $ initializationCause ) ; if ( $ initializationCause === ObjectManagerInterface :: INITIALIZATIONCAUSE_CREATED ) { $ this -> renderResource ( ) ; } }
Initialize this image variant

This method will generate the resource of this asset when this object has just been newly created.
We can't run renderResource() in the constructor since not all dependencies have been injected then. Generating
resources lazily in the getResource() method is not feasible either, because getters will be triggered
by the validation mechanism on flushing the persistence which will result in undefined behavior.

We don't call refresh() here because we only want the resource to be rendered, not all other refresh actions
from parent classes being executed.

@param integer $initializationCause
@return void
@throws Exception
@throws ImageFileException
@throws InvalidConfigurationException
Initialize this image variant