Please add the support for image field styles as well, It will be much appreciated. This is must for large websites.

Thanks.

Comments

jonhattan’s picture

Version: » 7.x-1.x-dev
Issue summary: View changes

Are you still interested in this?

emmonsaz’s picture

I was puzzled by the missing images after switching the container to Amazon S3. I finally tracked it down to the fact that storage_api_populate doesn't support image styles.

Fortunately, there's a workaround:

1. enable storage, storage_stream_wrapper, and storage_api_populate
2. set default download method to applicable Storage API option (/admin/config/media/file-system)
3. perform the global migration (/admin/structure/storage/populate) --> this will migrate the files and fields but not the styles, as mentioned above
4. enable https://www.drupal.org/project/imageinfo_cache
5. run drush image-generate and select All when prompted --> this will generate all the style files in the new storage directory
6. create the Amazon S3 container and a class for it
7. switch the stream wrapper to use the S3 class (/admin/structure/storage/stream-wrappers)
8. drush cron
9. verify the site works like normal

emmonsaz’s picture

...and yes, I'd love image styles support to be included in the populate module itself!

emmonsaz’s picture

Note: my workaround above is not compatible with sites using an Amazon S3 bucket set to "External". Styles will be generated locally, but Storage API attempts to send them to S3 on cron run which silently fails (since the bucket is in read-only External mode) but Drupal thinks the style now lives in S3 so it points the image source to S3 resulting in a broken image icon displayed to the end user on the web page.