-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix multi-file media to allow image fields only on image derivatives. #892
Conversation
@rosiel I'm a little confused on how the weird images that Drupal considers files get handled with this change to the "Generate Image Derivative For Media Attachement". If I wanted to create a JP2 can that go in an image field, and if I want to generate a Tiff from (say) a PDF so I use the "Generate File Derivative..." instead? Otherwise this seems to work as described and reduces the available fields. |
I'll look this over in more detail. I think you may be right that if you want to create a JP2 derivative from a TIFF you might unintuitively need to use the "File derivative" option. |
This reverts commit a297796.
Co-authored-by: @ajstanley <alanjarlathstanley@gmail.com>
3b4dea9
to
72eaaf6
Compare
In the default site configuration (I'm testing against the starter site) With this change, I'm no longer able to select I'm uncertain if this will cause issues, as I tried to manually change the Though that being said, the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works as stated, I was able to add another image field onto my image media type and populated it via the new action, which was limited to only selecting image fields.
Thank you! We should document the multifile media better so that you know that if you're creating a tiff or jpeg, you need to use File. Drupal does make assumptions about images. To my knowledge, Drupal Image fields refuse to accept JP2 or Tiff. I think this has something to do with the Drupal ImageService interface (which i understand is a wrapper for some backend software like imagemagick or GD). The ImageService perhaps outlaws those file types? or perhaps if we had a version of imagemagick that was compiled properly it would work? But would we want to ship drupal software that makes those kinds of assumptions about the capabilities of underlying and abstracted services?) |
GitHub Issue: Islandora/documentation#2003
What does this Pull Request do?
with @ajstanley, fixes the general and the image case of multifile media derivatives so that expected behaviours are maintained.
What's new?
This change is set in the UI form and can probably be overridden by setting up the action in the raw config, if you so desire.
(i.e. Regeneration activity, etc.)? no
How should this be tested?
Reproduce
field_media_file
andfield_media_image
.). The fact that you can see images is unnecessary.Test fix
Documentation Status
Additional Notes:
Any additional information that you think would be helpful when reviewing this
PR.
Interested parties
@Islandora/committers