1

I am moving a D7 site from local to staging for the first time. I pushed my codebase through deployment, and I did drush sql-dump to get the database moved over. Then I copied the files directory as-is.

The new server site works perfectly -- except that images that are supposed to be generated by the image styles show up as broken. They're not being dynamically generated like they should, even though the styles themselves are there.

Any thoughts on why this would happen or how to debug it?

1

Turns out I was trying to run deployment with my files directory outside of the Drupal root, and even though I was relatively pointing to the right path, it just didn't like that. So I symlinked sites/default/files to the folder outside of the Drupal root and it works fine now.

0

In general using the Features module is the best way to push configuration changes like "Image Styles" from dev to production: http://drupal.org/project/features . Yours is a different use case since you are pushing the entire database.

There is no "good" reason why the Image Styles shouldn't work on your new server. I would check to make sure that the file permissions on your production server are setup correctly. See: http://drupal.org/node/244924

Even if "sites/default/files" is given the proper permissions "sites/default/files/styles" might not have the proper permissions. You can check that the Image Style settings for your server are working correctly by visiting "/admin/config/media/image-styles/edit/thumbnail". If a style is not being generated there is an issue with your server setup.

Are you using 'GD2' or 'ImageMagic' and what version of PHP are you using to resize your images? These are PHP libraries that Drupal needs (1 of them has to be installed) to resize images. If you visit 'admin/reports/status' you should be able to see if one or both are installed correctly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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