Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Thousands of thumbnails in one directory might slow down file requests. I made a simple modification to video_embed_field_field_presave (video_embed_field.field.inc) to prevent this.
I added a prefix to the local path to group the files by creation date.
$prefix=date('Ymd', $entity->created );
$local_path = "public://video_embed_field_thumbnails/{$info['handler']}/$prefix/{$info['id']}.$thumb_extension";
Less complicated than adding support for filefield_paths (https://www.drupal.org/project/filefield_paths).
Might be usefull for these issues:
https://www.drupal.org/node/1844782
https://www.drupal.org/node/2525796
Comments