I exported my previous D7 database (db1), and imported it into a new database (db2). That said, all of my data (pages, articles, content, etc) seems to have exported the way it should... EXCEPT for the images attached to my articles. Now when I navigate to an article, what was uploaded to my field_image previously is now a broken link (even though the fid in my database seems to be correct). Does anyone know why this might be or how I can fix it?

If it helps, this is the error message I get on the screen as well:

Warning: array_key_exists() expects parameter 2 to be array, null given in theme_image_formatter() (line 605 of /modules/image/image.field.inc)

When I right click on the broken image and attempt to "show image address", it simply gives me my domain name. E.g. mydomain.com, and no real path to an image. Not sure if that matters.

  • If those images are image styles, then mostlikely it is due to folder permissions. The sites folder does not have permission to write and create those images styles. Make sure www-data is the owner of the sites folder.
    – No Sssweat
    Nov 27, 2016 at 5:11
  • @NoSssweat They are image styles, but I just double checked and my sites folder does have the correct permission set (777). Nov 27, 2016 at 17:13
  • Do they have www-data as folder owner?
    – No Sssweat
    Nov 28, 2016 at 1:30
  • @NoSssweat How can I check that? Nov 28, 2016 at 15:56
  • if you use FileZilla, and if you scroll to the right, it will tell you that, see pic
    – No Sssweat
    Nov 29, 2016 at 1:05

1 Answer 1


I am assuming that the Images are showing as uploaded in the backend. But when trying to view it on the front it is coming broken. you can check the file system path in the drupal admin it should be sites/default/files

if the file path is not the issue, then look at here(https://www.drupal.org/node/920840) there was a thread going around the warning and seems to be resolved. #22 could be the solution to look.

  • Exactly. And my file system path is set to sites/default/files, and still, images are broken. Nov 27, 2016 at 17:06
  • Fix #22 works (technically), but it doesn't repopulate missing images - it just gets rid of the error and makes broken images disappear completely.
    – Brittany
    Nov 28, 2016 at 17:52
  • can you try to run registry_rebuild once, the instructions are here drupal.org/project/registry_rebuild
    – Akash
    Nov 29, 2016 at 3:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.