diff options
author | Michal Junek <michal@junek.pw> | 2022-02-04 15:41:20 +0300 |
---|---|---|
committer | Michal Junek <michal@junek.pw> | 2022-02-07 16:49:22 +0300 |
commit | 76a1f000a4f9c1b621c292cf8fc36125ce613c0a (patch) | |
tree | f6276b00e300164dd39c941c628fb39b0363603a /src/nodes | |
parent | b8e9d8e2590133b2525dae6302a1978af5e2d327 (diff) |
[master] Render data URL images as-is
Signed-off-by: Michal Junek <michal@junek.pw>
Diffstat (limited to 'src/nodes')
-rw-r--r-- | src/nodes/ImageView.vue | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nodes/ImageView.vue b/src/nodes/ImageView.vue index 11117d2bc..f8bd2ad6c 100644 --- a/src/nodes/ImageView.vue +++ b/src/nodes/ImageView.vue @@ -170,7 +170,7 @@ export default { }) } } - if (this.isRemoteUrl || this.isPreviewUrl) { + if (this.isRemoteUrl || this.isPreviewUrl || this.isDataUrl) { return this.src } if (this.hasPreview && this.mime !== 'image/gif') { @@ -186,6 +186,9 @@ export default { return this.src.match(/^(\/index.php)?\/core\/preview/) || this.src.match(/^(\/index.php)?\/apps\/files_sharing\/publicpreview\//) }, + isDataUrl() { + return this.src.startsWith('data:') + }, basename() { return decodeURI(this.src.split('?')[0]) }, |