Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Various fixes related to image uploading & insertion:
Broken image uploading behavior if
media
is set in_config.yml
It appears that when 29b0f35 was merged, it accidentally broke image uploading if you've specified a
media
folder in your_config.yml
.How to reproduce
_config.yml
that specifies a media folder as well as at least one recognized image file withinconfig.media
.[Object object]/{file}
The
updateImageInsert
function was determining path by prependingassets
which is an object of all uploaded files, not the config.media path. This would result in the upload url being[Object object]/path
when using the media uploader.This fix
defaultUploadPath
function (reused from the default file upload code)Un-buildable metadata as result of image form use
When an image was uploaded to/selected from the modal in the metadata section, the value was prepended with
{{site.baseurl}}
which is improper as jekyll will not parse liquid syntax in front matter. A side affect of fixing this behavior is that image urls hosted externally now insert properly (as requested in #842 & #1019)How to reproduce
https://example.com/logo
or
{{site.baseurl}}/asset
This fix
Additionally I dd the following maintenance while I was poking around
isImage
classifier to include modern media formats based on Mozilla's Image format guide for the webisMedia
classifier to include formats based on Mozilla's media format guide for the webAlthough I tried to spend considerable time getting testing nailed down for this change, the lack of testing infra for
toolbar
&assetselection
made this a no go. The good news is thatdefaultUploadPath
has tests already (which are passing)