Islandora / documentation

Contains islandora's documentation and main issue queue.
MIT License
104 stars 71 forks source link

Add an 'Image' media bundle #483

Closed dannylamb closed 7 years ago

dannylamb commented 7 years ago

Depends on https://github.com/Islandora-CLAW/CLAW/issues/482

Create a media bundle for images, and export it into the islandora_image module. Make sure it can accept tiff and jp2 images in addition to the usual png, jpg, bmp, etc...

jyobb commented 7 years ago

I can take this on if it makes sense to do so. I see @kimpham54 is working on #482 which is related.

dannylamb commented 7 years ago

@jyobb We'll have to wrap up #482 so you'll have a place to deposit the yml files you'll be exporting. But feel free to go ahead and attempt to make the media bundle yourself through the UI.

Feel free to tag me if you need help.

jyobb commented 7 years ago

What UI should I be using. I'm a supernewb.

dannylamb commented 7 years ago

@jyobb If you go to http://localhost:8000/admin/structure there should be a link to edit media bundles. You can add a new Media bundle from there. You'll need to give it an 'Image' field as its contents and set that up to.

I'm in the process of spinning up a new vagrant so I can't take screen shots to show you. I'll post them in a bit if you're still having problems. Feel free to tag me if you have any new questions in the meantime.

jyobb commented 7 years ago

@dannylamb I can make the bundle no problem. Have there been any decisions made about what fields are needed?

dannylamb commented 7 years ago

@jyobb The only field strictly required would be the image field to hold the actual contents. Media bundles really serve the display layer more than anything else, and aside from linking to the contents, there's no plans at the moment for exposing any of its fields as jsonld. So there's no need to do a metadata mapping or whatnot. Basically, as soon as you have set things up where you can make the Media through admin/content and you see the thumbnail, you're good to issue a PR.

The important things is that it's configured to hold tiffs and jp2s. By default Drupal image fields only support the usual suspects of jpg, png, etc...

DiegoPino commented 7 years ago

@dannylamb are we not using https://github.com/drupal-media/media_entity_image anymore?

dannylamb commented 7 years ago

@DiegoPino The media_entity_image module is enabled by default on the vagrant environment and is the 'Type Provider' @jyobb will be using to make the media bundle.

dannylamb commented 7 years ago

@jyobb TL;DR w/r/t @DiegoPino's comment, as long as you select 'Image' in the 'Type Provider' drop down, you're good to go :+1: It should look something like this: screenshot from 2017-01-31 10-19-00

jyobb commented 7 years ago

I have created the media bundle but am a bit lost on how to export the yaml files.

DiegoPino commented 7 years ago

@jyobb hope this helps https://docs.acquia.com/article/lesson_52_exporting_configurations! 😄

whikloj commented 7 years ago

Ok.

  1. Go to Admin > Development > Configuration Synchronization
  2. Then click the Export tab.
  3. Then choose Single item
  4. Then select your item from the drop-down, it will display in the text box and should give you the path of the file below that.

Sorry my drupal 8 got corrupted as I was trying to check this, so I'm doing this a little from memory.

jyobb commented 7 years ago

thanks

jyobb commented 7 years ago

Once this is done how do I add it to the project? I ran through the export media bundle and can see the yaml. Unfortunately, the export button is missing but I'll figure that out.

dannylamb commented 7 years ago

@jyobb It's a pretty low-tech solution. Just copy/paste it from Drupal into a yaml file in /config/install. At the very bottom, underneath the text area with the contents, Drupal will tell you what to name the file.

And from the looks of it, https://github.com/Islandora-CLAW/islandora_image doesn't have a /config/install directory, so you'll have to make it.

ruebot commented 7 years ago

PR: https://github.com/Islandora-CLAW/islandora_image/pull/2

ruebot commented 7 years ago

Resolved with: https://github.com/Islandora-CLAW/islandora_image/commit/05c2450479602636c80d4c3ce11a8ec438835789