image.inc 738 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. /**
  3. * @file
  4. * Image module integration.
  5. */
  6. /**
  7. * Implements hook_filefield_paths_field_type_info() on behalf of image.module.
  8. *
  9. * @return array
  10. */
  11. function image_filefield_paths_field_type_info() {
  12. return array('image');
  13. }
  14. /**
  15. * Implements hook_menu_alter().
  16. *
  17. * @param $items
  18. */
  19. function filefield_paths_menu_alter(&$items) {
  20. // Workaround for issue with 'temporary://' image styles not being generated
  21. // correctly in Drupal core Image module.
  22. // @see https://www.drupal.org/node/2560139
  23. if (!isset($items['system/temporary/styles/%image_style']) && isset($items['system/files/styles/%image_style'])) {
  24. $items['system/temporary/styles/%image_style'] = $items['system/files/styles/%image_style'];
  25. }
  26. }