Skip to content

Sync-in · Sovereign platform for file storage, sharing, synchronization, and collaboration.

feat(frontend:files): support relative images in markdown viewer (#310)

Michael Seewald656401c76d41
diff --git a/frontend/src/app/applications/files/components/viewers/files-viewer-markdown.component.html b/frontend/src/app/applications/files/components/viewers/files-viewer-markdown.component.html
index 2faf8dc3..e962139e 100644
--- a/frontend/src/app/applications/files/components/viewers/files-viewer-markdown.component.html
+++ b/frontend/src/app/applications/files/components/viewers/files-viewer-markdown.component.html
@@ -325,6 +325,16 @@
</span>
</a>
</li>
+ @if (!file().root) {
+ <li role="menuitem">
+ <a (click)="insertImageFromRelativePath()" class="dropdown-item">
+ <span class="files-markdown-image-item">
+ <svg [lucideIcon]="icons.LucideImage"></svg>
+ <span l10nTranslate>Image from relative path</span>
+ </span>
+ </a>
+ </li>
+ }
<li role="menuitem">
<a (click)="insertImageFromUrl()" class="dropdown-item">
<span class="files-markdown-image-item">
diff --git a/frontend/src/app/applications/files/components/viewers/files-viewer-markdown.component.ts b/frontend/src/app/applications/files/components/viewers/files-viewer-markdown.component.ts
index 5ed0136a..a720c1ba 100644
--- a/frontend/src/app/applications/files/components/viewers/files-viewer-markdown.component.ts
+++ b/frontend/src/app/applications/files/components/viewers/files-viewer-markdown.component.ts
@@ -34,8 +34,8 @@ import {
LucideUnderline,
LucideUndo
} from '@lucide/angular'
-import { Editor, Extension, type Range } from '@tiptap/core'
-import Image, { type SetImageOptions } from '@tiptap/extension-image'
+import { Editor, Extension, isNodeSelection, type Range } from '@tiptap/core'
+import type { SetImageOptions } from '@tiptap/extension-image'
import { TaskItem } from '@tiptap/extension-list'
import { TableKit } from '@tiptap/extension-table'
import { TaskList } from '@tiptap/extension-task-list'
@@ -52,6 +52,7 @@ import { CodeMirrorFileViewerSearchAdapter } from './components/files-viewer-cod
import { FilesViewerSearchComponent } from './components/files-viewer-search.component'
import { TipTapFileViewerSearchAdapter } from './components/files-viewer-tiptap-search-adapter'
import { FilesViewerUnsavedChangesComponent } from './components/files-viewer-unsaved-changes.component'
+import { isAllowedAbsoluteImageSource, MarkdownImage, resolveMarkdownRelativeImageUrl } from './utils/markdown-image.utils'
type MarkdownHeadingLevel = 1 | 2 | 3 | 4
type MarkdownInlineMark = 'bold' | 'code' | 'italic' | 'strike' | 'underline'
@@ -114,8 +115,13 @@ export class FilesViewerMarkdownComponent extends FilesViewerEditableBase implem
resizable: true
}
}),
- Image.configure({
- allowBase64: true
+ MarkdownImage.configure({
+ allowBase64: true,
+ HTMLAttributes: {
+ decoding: 'async',
+ loading: 'lazy'
+ },
+ resolveSource: (source) => (isAllowedAbsoluteImageSource(source) ? source : resolveMarkdownRelativeImageUrl(this.file(), source))
}),
Markdown,
this.visualSearchAdapter.extension
@@ -367,7 +373,6 @@ export class FilesViewerMarkdownComponent extends FilesViewerEditableBase implem
this.layout.sendNotification('error', 'Unable to insert image', 'Unsupported image file')
return
}
-
const reader = new FileReader()
reader.onload = () => {
const src = typeof reader.result === 'string' ? reader.result : ''
@@ -383,13 +388,46 @@ export class FilesViewerMarkdownComponent extends FilesViewerEditableBase implem
protected insertImageFromUrl() {
this.runEditorCommand(() => {
- const previousSrc = this.editor.getAttributes('image').src as string | undefined
- const src = window.prompt('Image URL', previousSrc || 'https://')
- if (src === null || !src.trim()) return false
- const previousAlt = this.editor.getAttributes('image').alt as string | undefined
- const alt = window.prompt('Alternative text', previousAlt || '')
+ const imageAttributes = this.editor.getAttributes('image')
+ const previousSrc = imageAttributes.src as string | undefined
+ const src = window
+ .prompt(
+ this.layout.translateString('Image from URL'),
+ previousSrc && isAllowedAbsoluteImageSource(previousSrc) ? previousSrc : `${window.location.origin}/`
+ )
+ ?.trim()
+ if (!src) return false
+ if (!isAllowedAbsoluteImageSource(src)) {
+ this.layout.sendNotification('error', 'Unable to insert image', 'Invalid image URL')
+ return false
+ }
+ const previousAlt = imageAttributes.alt as string | undefined
+ const alt = window.prompt(this.layout.translateString('Description'), previousAlt || '')
if (alt === null) return false
- return this.insertImage({ src: src.trim(), alt: alt.trim() || undefined })
+ return this.insertImage({ src, alt: alt.trim() || undefined })
+ })
+ }
+
+ protected insertImageFromRelativePath() {
+ this.runEditorCommand(() => {
+ const file = this.file()
+ const imageAttributes = this.editor.getAttributes('image')
+ const previousSrc = imageAttributes.src as string | undefined
+ const src = window
+ .prompt(
+ this.layout.translateString('Image from relative path'),
+ previousSrc && resolveMarkdownRelativeImageUrl(file, previousSrc) ? previousSrc : 'images/'
+ )
+ ?.trim()
+ if (!src) return false
+ if (!resolveMarkdownRelativeImageUrl(file, src)) {
+ this.layout.sendNotification('error', 'Unable to insert image', 'Invalid relative image path')
+ return false
+ }
+ const previousAlt = imageAttributes.alt as string | undefined
+ const alt = window.prompt(this.layout.translateString('Description'), previousAlt || '')
+ if (alt === null) return false
+ return this.insertImage({ src, alt: alt.trim() || undefined })
})
}
@@ -475,7 +513,12 @@ export class FilesViewerMarkdownComponent extends FilesViewerEditableBase implem
}
private insertImage(options: SetImageOptions): boolean {
- return this.canEditVisual() && !this.editor.isDestroyed && this.editor.chain().focus().setImage(options).run()
+ if (!this.canEditVisual() || this.editor.isDestroyed) return false
+ const { selection } = this.editor.state
+ const command = this.editor.chain().focus()
+ return isNodeSelection(selection) && selection.node.type.name === 'image'
+ ? command.updateAttributes('image', options).run()
+ : command.setImage(options).run()
}
private currentWordRange(): Range | null {
diff --git a/frontend/src/app/applications/files/components/viewers/files-viewer-only-office.component.ts b/frontend/src/app/applications/files/components/viewers/files-viewer-only-office.component.ts
index 8e202bc5..19181465 100644
--- a/frontend/src/app/applications/files/components/viewers/files-viewer-only-office.component.ts
+++ b/frontend/src/app/applications/files/components/viewers/files-viewer-only-office.component.ts
@@ -9,7 +9,7 @@ import { StoreService } from '../../../../store/store.service'
import { FileModel } from '../../models/file.model'
import { FilesService } from '../../services/files.service'
import { fileLockPropsToString } from '../utils/file-lock.utils'
-import { OnlyOfficeComponent } from '../utils/only-office.component'
+import { OnlyOfficeComponent } from './utils/only-office.component'
@Component({
selector: 'app-files-viewer-only-office',
diff --git a/frontend/src/app/applications/files/components/viewers/interfaces/markdown-image.interface.ts b/frontend/src/app/applications/files/components/viewers/interfaces/markdown-image.interface.ts
new file mode 100644
index 00000000..deb1f5dc
--- /dev/null
+++ b/frontend/src/app/applications/files/components/viewers/interfaces/markdown-image.interface.ts
@@ -0,0 +1,5 @@
+import type { ImageOptions } from '@tiptap/extension-image'
+
+export interface MarkdownImageOptions extends ImageOptions {
+ resolveSource: (source: string) => string | null
+}
diff --git a/frontend/src/app/applications/files/components/viewers/utils/markdown-image.utils.ts b/frontend/src/app/applications/files/components/viewers/utils/markdown-image.utils.ts
new file mode 100644
index 00000000..0c610c58
--- /dev/null
+++ b/frontend/src/app/applications/files/components/viewers/utils/markdown-image.utils.ts
@@ -0,0 +1,103 @@
+import { API_FILES_OPERATION_THUMBNAIL } from '@sync-in-server/backend/src/applications/files/constants/routes'
+import { encodeUrl } from '@sync-in-server/backend/src/common/shared'
+import { getRenderedAttributes, mergeAttributes } from '@tiptap/core'
+import Image from '@tiptap/extension-image'
+import type { FileModel } from '../../../models/file.model'
+import type { MarkdownImageOptions } from '../interfaces/markdown-image.interface'
+
+const MARKDOWN_IMAGE_THUMBNAIL_SIZE = 1024
+
+export const MarkdownImage = Image.extend<MarkdownImageOptions>({
+ addOptions() {
+ return { ...this.parent?.(), resolveSource: (source: string) => source }
+ },
+
+ renderMarkdown(node) {
+ const src = node.attrs?.src ?? ''
+ const alt = node.attrs?.alt ?? ''
+ const title = node.attrs?.title ?? ''
+ // TipTap does not escape image fields, so preserve paths and labels containing Markdown delimiters.
+ const escapedAlt = alt.replace(/[\\[\]]/g, '\\$&')
+ const escapedTitle = title.replace(/["\\]/g, '\\$&')
+ const destination = /[\s()<>\\]/.test(src) ? `<${src.replace(/[\\<>]/g, '\\$&')}>` : src
+ return title ? `![${escapedAlt}](${destination} "${escapedTitle}")` : `![${escapedAlt}](${destination})`
+ },
+
+ addNodeView() {
+ if (typeof document === 'undefined') return null
+
+ return ({ node, HTMLAttributes, editor }) => {
+ const image = document.createElement('img')
+ let previousAttributes: Record<string, unknown> = {}
+ let previousResolvedSource: string | null = null
+ const updateImage = (attributes: Record<string, unknown>) => {
+ const nextAttributes = mergeAttributes(this.options.HTMLAttributes, attributes)
+
+ for (const name of Object.keys(previousAttributes)) {
+ if (!(name in nextAttributes)) image.removeAttribute(name)
+ }
+ for (const [name, value] of Object.entries(nextAttributes)) {
+ if (name === 'src' || previousAttributes[name] === value) continue
+ if (value == null) {
+ image.removeAttribute(name)
+ } else {
+ image.setAttribute(name, String(value))
+ }
+ }
+
+ // Only the live node view resolves paths. HTML clipboard and Markdown serialization retain the source.
+ const source = typeof nextAttributes.src === 'string' ? this.options.resolveSource(nextAttributes.src) : null
+ if (source !== previousResolvedSource) {
+ if (source) {
+ image.setAttribute('src', source)
+ } else {
+ image.removeAttribute('src')
+ }
+ previousResolvedSource = source
+ }
+ previousAttributes = nextAttributes
+ }
+ updateImage(HTMLAttributes)
+ const extensionAttributes = editor.extensionManager.attributes.filter((attribute) => attribute.type === node.type.name)
+
+ return {
+ dom: image,
+ update: (updatedNode) => {
+ if (updatedNode.type !== node.type) return false
+ updateImage(getRenderedAttributes(updatedNode, extensionAttributes))
+ return true
+ }
+ }
+ }
+ }
+})
+
+export function isAllowedAbsoluteImageSource(source: string): boolean {
+ if (source !== source.trim()) return false
+ if (source.slice(0, 11).toLowerCase() === 'data:image/') return true
+
+ try {
+ const imageUrl = source.startsWith('/') ? new URL(source, window.location.href) : new URL(source)
+ return (imageUrl.protocol === 'http:' || imageUrl.protocol === 'https:') && imageUrl.origin === window.location.origin
+ } catch {
+ return false
+ }
+}
+
+export function resolveMarkdownRelativeImageUrl(file: FileModel, reference: string): string | null {
+ if (!reference || file.root || reference !== reference.trim()) return null
+
+ try {
+ const documentUrl = new URL(file.thumbnailUrl, window.location.href)
+ const scopeUrl = new URL(`${API_FILES_OPERATION_THUMBNAIL}/${encodeUrl(file.basePath)}/`, window.location.href)
+ if (!documentUrl.pathname.startsWith(scopeUrl.pathname)) return null
+
+ const imageUrl = new URL(reference, documentUrl)
+ if (imageUrl.origin !== scopeUrl.origin || !imageUrl.pathname.startsWith(scopeUrl.pathname) || imageUrl.pathname.endsWith('/')) {
+ return null
+ }
+ return `${imageUrl.pathname}?size=${MARKDOWN_IMAGE_THUMBNAIL_SIZE}`
+ } catch {
+ return null
+ }
+}
diff --git a/frontend/src/app/applications/files/components/utils/only-office.component.ts b/frontend/src/app/applications/files/components/viewers/utils/only-office.component.ts
similarity index 100%
rename from frontend/src/app/applications/files/components/utils/only-office.component.ts
rename to frontend/src/app/applications/files/components/viewers/utils/only-office.component.ts
diff --git a/frontend/src/app/applications/files/components/utils/only-office.utils.ts b/frontend/src/app/applications/files/components/viewers/utils/only-office.utils.ts
similarity index 100%
rename from frontend/src/app/applications/files/components/utils/only-office.utils.ts
rename to frontend/src/app/applications/files/components/viewers/utils/only-office.utils.ts
diff --git a/frontend/src/app/applications/files/models/file.model.ts b/frontend/src/app/applications/files/models/file.model.ts
index bcbe5c4f..c1cd7074 100644
--- a/frontend/src/app/applications/files/models/file.model.ts
+++ b/frontend/src/app/applications/files/models/file.model.ts
@@ -46,6 +46,7 @@ export class FileModel implements File {
ctime: number
// Extra properties
+ readonly basePath: string
hasComments: boolean
isFavorite = false
root?: {
@@ -91,6 +92,7 @@ export class FileModel implements File {
constructor(props: FileProps | File, basePath: string, inShare = false, editorConfig: FileEditorProviders) {
this.setShares(popFromObject('shares', props))
Object.assign(this, props)
+ this.basePath = basePath
this.path = `${basePath}/${this.path !== '.' ? `${this.path}/` : ''}${this.root?.alias || this.name}`
this.mime = this.getMime(this.mime, inShare, editorConfig)
this.updateHTimeAgo(this.mtime)
diff --git a/frontend/src/i18n/ca.json b/frontend/src/i18n/ca.json
index cfbd62f3..61b88997 100644
--- a/frontend/src/i18n/ca.json
+++ b/frontend/src/i18n/ca.json
@@ -715,6 +715,7 @@
"Image": "Imatge",
"Image from file": "Imatge d'un fitxer",
"Image from URL": "Imatge des d'una URL",
+ "Image from relative path": "Imatge des d'una ruta relativa",
"me": "jo",
"The file is locked by": "El fitxer està bloquejat per",
"Unlock": "Desbloquejar",
@@ -803,6 +804,8 @@
"Unable to unlock file": "No s'ha pogut desbloquejar el fitxer",
"Unable to insert image": "No s'ha pogut inserir la imatge",
"Unsupported image file": "Fitxer d'imatge no compatible",
+ "Invalid image URL": "URL d'imatge no vàlida",
+ "Invalid relative image path": "Camí relatiu de la imatge no vàlid",
"Unable to load": "No s'ha pogut carregar",
"Unable to create": "No s'ha pogut crear",
"Unable to update": "No s'ha pogut actualitzar",
diff --git a/frontend/src/i18n/de.json b/frontend/src/i18n/de.json
index f2e0d8e3..427a5b41 100644
--- a/frontend/src/i18n/de.json
+++ b/frontend/src/i18n/de.json
@@ -715,6 +715,7 @@
"Image": "Bild",
"Image from file": "Bild aus Datei",
"Image from URL": "Bild aus URL",
+ "Image from relative path": "Bild aus relativem Pfad",
"me": "ich",
"The file is locked by": "Die Datei ist gesperrt von",
"Unlock": "Entsperren",
@@ -803,6 +804,8 @@
"Unable to unlock file": "Datei kann nicht entsperrt werden",
"Unable to insert image": "Bild kann nicht eingefügt werden",
"Unsupported image file": "Nicht unterstützte Bilddatei",
+ "Invalid image URL": "Ungültige Bild-URL",
+ "Invalid relative image path": "Ungültiger relativer Bildpfad",
"Unable to load": "Laden nicht möglich",
"Unable to create": "Erstellen nicht möglich",
"Unable to update": "Aktualisieren nicht möglich",
diff --git a/frontend/src/i18n/es.json b/frontend/src/i18n/es.json
index d26fce0d..e83f0e1d 100644
--- a/frontend/src/i18n/es.json
+++ b/frontend/src/i18n/es.json
@@ -715,6 +715,7 @@
"Image": "Imagen",
"Image from file": "Imagen desde archivo",
"Image from URL": "Imagen desde URL",
+ "Image from relative path": "Imagen desde una ruta relativa",
"me": "yo",
"The file is locked by": "El archivo está bloqueado por",
"Unlock": "Desbloquear",
@@ -803,6 +804,8 @@
"Unable to unlock file": "No se pudo desbloquear el archivo",
"Unable to insert image": "No se pudo insertar la imagen",
"Unsupported image file": "Archivo de imagen no compatible",
+ "Invalid image URL": "URL de imagen no válida",
+ "Invalid relative image path": "Ruta relativa de la imagen no válida",
"Unable to load": "No se pudo cargar",
"Unable to create": "No se pudo crear",
"Unable to update": "No se pudo actualizar",
diff --git a/frontend/src/i18n/fr.json b/frontend/src/i18n/fr.json
index bcc56c0e..e1f0d94d 100644
--- a/frontend/src/i18n/fr.json
+++ b/frontend/src/i18n/fr.json
@@ -715,6 +715,7 @@
"Image": "Image",
"Image from file": "Image depuis un fichier",
"Image from URL": "Image depuis une URL",
+ "Image from relative path": "Image depuis un chemin relatif",
"me": "moi",
"The file is locked by": "Le fichier est verrouillé par",
"Unlock": "Déverrouiller",
@@ -803,6 +804,8 @@
"Unable to unlock file": "Impossible de déverrouiller le fichier",
"Unable to insert image": "Impossible d'insérer l'image",
"Unsupported image file": "Fichier image non pris en charge",
+ "Invalid image URL": "URL d’image invalide",
+ "Invalid relative image path": "Chemin relatif de l’image invalide",
"Unable to load": "Impossible de charger",
"Unable to create": "Impossible de créer",
"Unable to update": "Impossible de mettre à jour",
diff --git a/frontend/src/i18n/hi.json b/frontend/src/i18n/hi.json
index 7bc7185e..ed926a48 100644
--- a/frontend/src/i18n/hi.json
+++ b/frontend/src/i18n/hi.json
@@ -715,6 +715,7 @@
"Image": "छवि",
"Image from file": "फ़ाइल से छवि",
"Image from URL": "URL से छवि",
+ "Image from relative path": "सापेक्ष पथ से छवि",
"me": "मैं",
"The file is locked by": "फ़ाइल निम्न द्वारा लॉक है",
"Unlock": "अनलॉक करें",
@@ -803,6 +804,8 @@
"Unable to unlock file": "फ़ाइल अनलॉक नहीं की जा सकी",
"Unable to insert image": "छवि सम्मिलित नहीं की जा सकी",
"Unsupported image file": "असमर्थित छवि फ़ाइल",
+ "Invalid image URL": "अमान्य छवि URL",
+ "Invalid relative image path": "अमान्य सापेक्ष छवि पथ",
"Unable to load": "लोड नहीं किया जा सका",
"Unable to create": "बनाया नहीं जा सका",
"Unable to update": "अपडेट नहीं किया जा सका",
diff --git a/frontend/src/i18n/it.json b/frontend/src/i18n/it.json
index 688a0478..9fe672d6 100644
--- a/frontend/src/i18n/it.json
+++ b/frontend/src/i18n/it.json
@@ -715,6 +715,7 @@
"Image": "Immagine",
"Image from file": "Immagine da file",
"Image from URL": "Immagine da URL",
+ "Image from relative path": "Immagine da percorso relativo",
"me": "io",
"The file is locked by": "Il file è bloccato da",
"Unlock": "Sblocca",
@@ -803,6 +804,8 @@
"Unable to unlock file": "Impossibile sbloccare il file",
"Unable to insert image": "Impossibile inserire l'immagine",
"Unsupported image file": "File immagine non supportato",
+ "Invalid image URL": "URL dell'immagine non valido",
+ "Invalid relative image path": "Percorso relativo dell'immagine non valido",
"Unable to load": "Impossibile caricare",
"Unable to create": "Impossibile creare",
"Unable to update": "Impossibile aggiornare",
diff --git a/frontend/src/i18n/ja.json b/frontend/src/i18n/ja.json
index 2f86a6df..01b925ea 100644
--- a/frontend/src/i18n/ja.json
+++ b/frontend/src/i18n/ja.json
@@ -715,6 +715,7 @@
"Image": "画像",
"Image from file": "ファイルから画像",
"Image from URL": "URLから画像",
+ "Image from relative path": "相対パスから画像",
"me": "自分",
"The file is locked by": "ファイルは次のユーザーによってロックされています",
"Unlock": "ロック解除",
@@ -803,6 +804,8 @@
"Unable to unlock file": "ファイルのロックを解除できません",
"Unable to insert image": "画像を挿入できません",
"Unsupported image file": "サポートされていない画像ファイル",
+ "Invalid image URL": "画像の URL が無効です",
+ "Invalid relative image path": "画像の相対パスが無効です",
"Unable to load": "読み込めません",
"Unable to create": "作成できません",
"Unable to update": "更新できません",
diff --git a/frontend/src/i18n/ko.json b/frontend/src/i18n/ko.json
index 0830573f..5d62503b 100644
--- a/frontend/src/i18n/ko.json
+++ b/frontend/src/i18n/ko.json
@@ -715,6 +715,7 @@
"Image": "이미지",
"Image from file": "파일에서 이미지",
"Image from URL": "URL에서 이미지",
+ "Image from relative path": "상대 경로에서 이미지",
"me": "나",
"The file is locked by": "파일이 다음 사용자에 의해 잠겨 있습니다",
"Unlock": "잠금 해제",
@@ -803,6 +804,8 @@
"Unable to unlock file": "파일 잠금을 해제할 수 없습니다",
"Unable to insert image": "이미지를 삽입할 수 없습니다",
"Unsupported image file": "지원되지 않는 이미지 파일",
+ "Invalid image URL": "잘못된 이미지 URL",
+ "Invalid relative image path": "잘못된 상대 이미지 경로",
"Unable to load": "불러올 수 없습니다",
"Unable to create": "생성할 수 없습니다",
"Unable to update": "업데이트할 수 없습니다",
diff --git a/frontend/src/i18n/nl.json b/frontend/src/i18n/nl.json
index 60ef49fa..70367045 100644
--- a/frontend/src/i18n/nl.json
+++ b/frontend/src/i18n/nl.json
@@ -715,6 +715,7 @@
"Image": "Afbeelding",
"Image from file": "Afbeelding uit bestand",
"Image from URL": "Afbeelding via URL",
+ "Image from relative path": "Afbeelding via relatief pad",
"me": "ik",
"The file is locked by": "Het bestand is vergrendeld door",
"Unlock": "Ontgrendelen",
@@ -803,6 +804,8 @@
"Unable to unlock file": "Kan bestand niet ontgrendelen",
"Unable to insert image": "Kan afbeelding niet invoegen",
"Unsupported image file": "Niet-ondersteund afbeeldingsbestand",
+ "Invalid image URL": "Ongeldige afbeeldings-URL",
+ "Invalid relative image path": "Ongeldig relatief afbeeldingspad",
"Unable to load": "Kan niet laden",
"Unable to create": "Kan niet aanmaken",
"Unable to update": "Kan niet bijwerken",
diff --git a/frontend/src/i18n/pl.json b/frontend/src/i18n/pl.json
index 01ab24ae..2b92f821 100644
--- a/frontend/src/i18n/pl.json
+++ b/frontend/src/i18n/pl.json
@@ -715,6 +715,7 @@
"Image": "Obraz",
"Image from file": "Obraz z pliku",
"Image from URL": "Obraz z URL",
+ "Image from relative path": "Obraz ze ścieżki względnej",
"me": "ja",
"The file is locked by": "Plik jest zablokowany przez",
"Unlock": "Odblokuj",
@@ -803,6 +804,8 @@
"Unable to unlock file": "Nie można odblokować pliku",
"Unable to insert image": "Nie można wstawić obrazu",
"Unsupported image file": "Nieobsługiwany plik obrazu",
+ "Invalid image URL": "Nieprawidłowy adres URL obrazu",
+ "Invalid relative image path": "Nieprawidłowa względna ścieżka obrazu",
"Unable to load": "Nie można wczytać",
"Unable to create": "Nie można utworzyć",
"Unable to update": "Nie można zaktualizować",
diff --git a/frontend/src/i18n/pt-BR.json b/frontend/src/i18n/pt-BR.json
index 674cadb5..1cb7220e 100644
--- a/frontend/src/i18n/pt-BR.json
+++ b/frontend/src/i18n/pt-BR.json
@@ -715,6 +715,7 @@
"Image": "Imagem",
"Image from file": "Imagem do arquivo",
"Image from URL": "Imagem da URL",
+ "Image from relative path": "Imagem de caminho relativo",
"me": "eu",
"The file is locked by": "O arquivo está bloqueado por",
"Unlock": "Desbloquear",
@@ -803,6 +804,8 @@
"Unable to unlock file": "Não foi possível desbloquear o arquivo",
"Unable to insert image": "Não foi possível inserir a imagem",
"Unsupported image file": "Arquivo de imagem não compatível",
+ "Invalid image URL": "URL da imagem inválida",
+ "Invalid relative image path": "Caminho relativo da imagem inválido",
"Unable to load": "Não foi possível carregar",
"Unable to create": "Não foi possível criar",
"Unable to update": "Não foi possível atualizar",
diff --git a/frontend/src/i18n/pt.json b/frontend/src/i18n/pt.json
index 9f14834a..7bfd43fa 100644
--- a/frontend/src/i18n/pt.json
+++ b/frontend/src/i18n/pt.json
@@ -715,6 +715,7 @@
"Image": "Imagem",
"Image from file": "Imagem do arquivo",
"Image from URL": "Imagem da URL",
+ "Image from relative path": "Imagem de caminho relativo",
"me": "eu",
"The file is locked by": "O arquivo está bloqueado por",
"Unlock": "Desbloquear",
@@ -803,6 +804,8 @@
"Unable to unlock file": "Não foi possível desbloquear o arquivo",
"Unable to insert image": "Não foi possível inserir a imagem",
"Unsupported image file": "Arquivo de imagem não suportado",
+ "Invalid image URL": "URL da imagem inválida",
+ "Invalid relative image path": "Caminho relativo da imagem inválido",
"Unable to load": "Não foi possível carregar",
"Unable to create": "Não foi possível criar",
"Unable to update": "Não foi possível atualizar",
diff --git a/frontend/src/i18n/ru.json b/frontend/src/i18n/ru.json
index eb02a1b1..ca8e4a0e 100644
--- a/frontend/src/i18n/ru.json
+++ b/frontend/src/i18n/ru.json
@@ -715,6 +715,7 @@
"Image": "Изображение",
"Image from file": "Изображение из файла",
"Image from URL": "Изображение по URL",
+ "Image from relative path": "Изображение по относительному пути",
"me": "я",
"The file is locked by": "Файл заблокирован пользователем",
"Unlock": "Разблокировать",
@@ -803,6 +804,8 @@
"Unable to unlock file": "Не удалось разблокировать файл",
"Unable to insert image": "Не удалось вставить изображение",
"Unsupported image file": "Неподдерживаемый файл изображения",
+ "Invalid image URL": "Недопустимый URL изображения",
+ "Invalid relative image path": "Недопустимый относительный путь к изображению",
"Unable to load": "Не удалось загрузить",
"Unable to create": "Не удалось создать",
"Unable to update": "Не удалось обновить",
diff --git a/frontend/src/i18n/tr.json b/frontend/src/i18n/tr.json
index 3d56a5d3..244abd6b 100644
--- a/frontend/src/i18n/tr.json
+++ b/frontend/src/i18n/tr.json
@@ -715,6 +715,7 @@
"Image": "Görsel",
"Image from file": "Dosyadan görsel",
"Image from URL": "URL'den görsel",
+ "Image from relative path": "Göreli yoldan görsel",
"me": "ben",
"The file is locked by": "Dosya şu kişi tarafından kilitlendi",
"Unlock": "Kilidi Aç",
@@ -803,6 +804,8 @@
"Unable to unlock file": "Dosyanın kilidi açılamadı",
"Unable to insert image": "Görüntü eklenemedi",
"Unsupported image file": "Desteklenmeyen görüntü dosyası",
+ "Invalid image URL": "Geçersiz görüntü URL'si",
+ "Invalid relative image path": "Geçersiz göreli görüntü yolu",
"Unable to load": "Yüklenemedi",
"Unable to create": "Oluşturulamadı",
"Unable to update": "Güncellenemedi",
diff --git a/frontend/src/i18n/zh.json b/frontend/src/i18n/zh.json
index 1368368e..531b3f85 100644
--- a/frontend/src/i18n/zh.json
+++ b/frontend/src/i18n/zh.json
@@ -715,6 +715,7 @@
"Image": "图像",
"Image from file": "从文件插入图像",
"Image from URL": "从 URL 插入图像",
+ "Image from relative path": "从相对路径插入图像",
"me": "我",
"The file is locked by": "该文件被以下用户锁定",
"Unlock": "解锁",
@@ -803,6 +804,8 @@
"Unable to unlock file": "无法解锁文件",
"Unable to insert image": "无法插入图像",
"Unsupported image file": "不支持的图像文件",
+ "Invalid image URL": "无效的图像 URL",
+ "Invalid relative image path": "无效的相对图像路径",
"Unable to load": "无法加载",
"Unable to create": "无法创建",
"Unable to update": "无法更新",