Hi, a possible customer wants to upgrade its large D7 site. He made use of the Media CKEditor module in Drupal, which embeds images in WYSYWYG field with code like
<p>[[{"fid":"5916","view_mode":"default","fields":{"format":"default","alignment":"center","field_file_image_alt_text[und][0][value]":false,"field_file_image_title_text[und][0][value]":false},"type":"media","field_deltas":{"2":{"format":"default","alignment":"center","field_file_image_alt_text[und][0][value]":false,"field_file_image_title_text[und][0][value]":false}},"attributes":{"class":"media-element file-default media-wysiwyg-align-center","data-delta":"2"}}]]</p>
Is there any function in Backdrop CMS which converts this code into proper media asset code <img src="..."/>. Or is there any function in D7 to get rid of the module before upgrading?
Any comment is very welcome:-)
I've worked on a script that will convert custom blocks (and translations), blocks in layouts, and long text fields (text_long, text_with_summary) in entities. It will convert simple image file entities (with no custom fields) to the embedded image provided by Backdrop; and it converts video file entities (with no custom fields) to Video Filter tokens:
Let me know how that works for you and if you have any improvements you can share back.
For now this script does the trick for me but someone is free to adapt it for their own uses or turn it into a friendlier GUI or whatever.