mitodl / ocw-studio

Open Source Courseware authoring tool
BSD 3-Clause "New" or "Revised" License
9 stars 3 forks source link

Convert markdown images using resource_file shortcode to images #1012

Closed ChristopherChudzicki closed 2 years ago

ChristopherChudzicki commented 2 years ago

Task

Convert resource_file-based images, e.g.,

![Professor Jeff Gore]({{< resource_file 8c8f3d8e-da91-817b-219e-e6671b2456a6 >}})

to use the embed resource shortcode:

< resource 8c8f3d8e-da91-817b-219e-e6671b2456a6 >

Why

This makes migrated images match how we embed resource images in studio; The resource_file version is not supported in studio. For example, see "Instructor Insights" at https://ocw-studio-rc.odl.mit.edu/sites/8-591j-systems-biology-fall-2014/type/page/

Open Questions

The resource 8c8f3d8e-da91-817b-219e-e6671b2456a6 is missing image-alt image metadata. Should we update the resource image metdata based on the original markdown image embed? I lean toward yes... otherwise we lose the data. Could also add an optional parameter to the shortcode.

ChristopherChudzicki commented 2 years ago

This has been done on prod.