title: How to an image respecting the image editor crop in controller? TYPO3
body: <p>how can I get an image path from a record in the controller respecting the crop settings from the back end image editor?</p>
  
  <p>My current code (in the model) only gives me the the image with no crop but with the adjusted dimensions.</p>
  
  <pre><code>public function getImageUrl($imageResource)
      {
          return $imageResource-&gt;getOriginalResource()-&gt;getOriginalFile()-&gt;getPublicUrl();
      }
  
      public function getSmallImage($imageResource)
      {
          $image = $this-&gt;imageService-&gt;getImage($this-&gt;getImageUrl($imageResource), null, false);
  
          $processingInstructions = [
              'maxWidth' =&gt; 500,
              'maxHeight' =&gt; 500
          ];
          $processedImage = $this-&gt;imageService-&gt;applyProcessingInstructions($image, $processingInstructions);
          return $this-&gt;imageService-&gt;getImageUri($processedImage);
      } 
  
  public function getSmallImage($imageResource)
      {
          $image = $this-&gt;imageService-&gt;getImage($this-&gt;getImageUrl($imageResource), null, false);
  
          $processingInstructions = [
              'maxWidth' =&gt; 500,
              'maxHeight' =&gt; 500
          ];
          $processedImage = $this-&gt;imageService-&gt;applyProcessingInstructions($image, $processingInstructions);
          return $this-&gt;imageService-&gt;getImageUri($processedImage);
      }
  </code></pre>
  
  <p>Must I feed the crop to the <code>$processingInstructions</code>? Where to find the crop?</p>
  
  <p>I am using TYPO3 8.7.</p>