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.
I want to enable the media module for an existing site that was migrated from D6 more than a year ago, but unless I remove and reupload existing images, media doesn't recognize the image. With the media browser the ability to view the image library won't appear until after I remove the exist image also. I have search but have found nothing that relates to the issue I'm having. Thank you.
Comment | File | Size | Author |
---|---|---|---|
Screenshot from 2017-05-24 15-34-21.jpg | 176.15 KB | couloir007 |
Comments
Comment #2
joseph.olstadlooks like a configuration issue;
try /admin/structure/file-types/manage/image/file-display
make sure your image styles are configured correctly
Comment #3
joseph.olstadComment #4
joseph.olstadThis option should be checked:
Format the file as an image. The image can be displayed using an image style and can optionally be linked to the image file itself or its
parent content.
also, check your file entity permissions , permissions for view file, create file, etc
review your media configuration and image or file entity type configuration.
Comment #5
couloir007 CreditAttribution: couloir007 commentedLooks like if I edit the image and save it, it fixes it. It must be the file itself, not a node with the image field.
Comment #6
joseph.olstadwrite a simple script that loads and saves the file entities (all of them one at a time in a foreach loop), run it with drush like this:
drush scr couloir007_script.php
Comment #7
couloir007 CreditAttribution: couloir007 commentedWill do, Thanks!
Comment #8
joseph.olstadThe script solution should do the job in this case.
Thanks.