The first commit ensures that the cook-text has a value set for the
element field. This is needed to call the
The other two are trying to solve the main problem in two ways: one solution is entirely client-side and the other one is entirely server-side.
It tries to resolve the short URLs as usual and when that fails because the upload is missing, it replaces the whole element with the placeholder.
- Easy to implement and reason about.
- It covers all the cases.
- Does not alter the reviewables records.
- It can cause some flickering when the images are replaced with the placeholder.
- The operation is not instant and some requests must be made before the client can decide if the image is indeed missing.
It tries to replace the images with the short URLs with the placeholder in the job which deletes the upload records.
- The replacement happens only once and the result is saved.
- Reduces the load (less requests) on the client-side.
- It searches for the upload in all reviewables.
- Difficult to find all uses of the short URLs as there is no inverse HTML-to-Markdown map. Currently, it only covers the usual Markdown
- Alters reviewable records.