original_string: public function resizeAction($imageName)
      {
          try {
              $imageOptimizer = $this->get('harentius_blog.image_optimizer');
              $imagePath = $imageOptimizer->createPreviewIfNotExists($imageName);
  
              return new BinaryFileResponse($imagePath);
          } catch (\Exception $e) {
              throw new NotFoundHttpException(sprintf('File %s not found', $imageName));
          }
      }
code: public function resizeAction($imageName)
      {
          try {
              $imageOptimizer = $this->get('harentius_blog.image_optimizer');
              $imagePath = $imageOptimizer->createPreviewIfNotExists($imageName);
  
              return new BinaryFileResponse($imagePath);
          } catch (\Exception $e) {
              throw new NotFoundHttpException(sprintf('File %s not found', $imageName));
          }
      }
code_tokens: public function resizeAction ( $ imageName ) { try { $ imageOptimizer = $ this -> get ( 'harentius_blog.image_optimizer' ) ; $ imagePath = $ imageOptimizer -> createPreviewIfNotExists ( $ imageName ) ; return new BinaryFileResponse ( $ imagePath ) ; } catch ( \ Exception $ e ) { throw new NotFoundHttpException ( sprintf ( 'File %s not found' , $ imageName ) ) ; } }
docstring: For optimization, try_files should be set in nginx
  Then BinaryFileResponse only once, when crete cache preview.
  
  @param string $imageName
  @return Response
docstring_tokens: For optimization try_files should be set in nginx Then BinaryFileResponse only once when crete cache preview .