Handle file upload references (e.g. File:Foo.png) in the content to refer stored on a S3/Swift raw file.
renoirb opened this issue · 1 comments
renoirb commented
MediaWiki handles ways to store file uploads into various backends. In a MediaWiki page we would use a syntax to have the file displayed such as [[File:My_Image_name.png]]
which then gets handled by MediaWiki and generates tag for us.
On a static site, we won’t have this for us. We’ll have to have our static site generator to allow us to keep similar reference format without a need to migrate content.
Requirements
- Convert MediaWiki syntax into a minimal HTML format
- Keep feature to not require editors to have full hardcoded file reference URL
Ideal syntax could be something that we can handle file reference from either the static site generator or an Asynchronous client-side JavaScript handler.
Syntax proposal
<img data-remote="My_Image_name.png" />
- Valid HTML markup
- Will be easy to grab by static site generator to have a default "1x1.gif" if we let frontend do it for us
- Leaves us liberty to re-implement later
renoirb commented
No need to do, we get all images correctly through MediaWiki API parser output.