Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ImageHooks.php

function ImageHooks::fileMove

Implements hook_file_move().

File

core/modules/image/src/Hook/ImageHooks.php, line 222

Class

ImageHooks
Hook implementations for image.

Namespace

Drupal\image\Hook

Code

public function fileMove(FileInterface $file, FileInterface $source) {
    // Delete any image derivatives at the original image path.
    image_path_flush($source->getFileUri());
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal