Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
The pre-pending of file_directory_path() causes errors as the file_create_path() (file.inc, line 64) method implicitly uses file_directory_path().
This means that if you specify "images" as you image directory the file_directory_path() will be pre-pended giving "sites/default/files/images" and then this will be passed to file_create_path() which again pre-pends the file_directory_path() giving "sites/default/files/sites/default/files/images" which of course does not exist.
Possible Fix
Remove the initial "file_directory_path()" pre-pend to give:
722: $image_path = file_create_path(variable_get('image_default_path', 'images'));
The default image path "images/tmp" is incorrect. Change the default path to "sites/default/files/images/temp", and click "save configuration". Drupal should be happy now.
Comments
Comment #1
b_ commentedHave a look at the image.module file, around line 722:
722: $image_path = file_create_path(file_directory_path() . '/' . variable_get('image_default_path', 'images'));
The pre-pending of file_directory_path() causes errors as the file_create_path() (file.inc, line 64) method implicitly uses file_directory_path().
This means that if you specify "images" as you image directory the file_directory_path() will be pre-pended giving "sites/default/files/images" and then this will be passed to file_create_path() which again pre-pends the file_directory_path() giving "sites/default/files/sites/default/files/images" which of course does not exist.
Possible Fix
Remove the initial "file_directory_path()" pre-pend to give:
722: $image_path = file_create_path(variable_get('image_default_path', 'images'));
Hope this makes sense.
Comment #2
g.s commentedComment #4
sunComment #5
asespat commentedI have the same issue
this error appears
El directorio /tmp/image no existe.
The file does not exist
But the file exist
I use the last image module 6.10 - alpha4
any idea?
thanks
Comment #6
sunPlease test the patch in #225024: Incomplete path is used in image module resulting in unnecessary php warnings
Comment #7
benjaminwittenberg commentedI also had this issue.
The default image path "images/tmp" is incorrect. Change the default path to "sites/default/files/images/temp", and click "save configuration". Drupal should be happy now.