Scan your whole stack
From OX Research Newsroom
Are you using tiptap-extension-gallery-layout?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v1.5.1
tiptap-extension-gallery-layout was last scanned on 30 Nov 2026 at version 1.5.1. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 1.5.1 LATEST | 30 Nov 2026 | No rules fired |
| 1.5.0 | 30 Nov 2026 | No rules fired |
| 1.4.0 | 29 Nov 2026 | No rules fired |
| 1.3.0 | 28 Nov 2026 | Not shown |
| 1.2.0 | 28 Nov 2026 | Not shown |
Findings for v1.5.1. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 1.5.1; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
Tiptap Extension Gallery Layout is a library for creating beautiful photo galleries inside Tiptap rich text editor.
For a live demo, please visit the Gallery Layout Demo
To use the Gallery within your Tiptap editor, you need to install the extension and several other libraries that are required for this project to work properly. You can install them by running the following command:
npm install tiptap-extension-gallery-layout gallery-layout @tiptap/core
Note:
@tiptap/coreandgallery-layoutare strictly required as Peer Dependencies for the extension to function properly
Compatibility: This extension requires Tiptap v2.0.0 or higher. It is not compatible with Tiptap v1.
Tiptap extensions are for you if you use Tiptap rich text in your project. I recommend using it if your project is already using Tiptap, as there are several advantages to using it. You can check out those benefits here
To use the Gallery within your Tiptap editor, simply add the GalleryExtension to your extensions list
Note: This extension is built with pure Vanilla JavaScript, which means it is 100% framework-agnostic. Whether you use Tiptap in React, Vue, Svelte, or Vanilla JS, the installation and command usage remain exactly the same
Important: You must also import the CSS from the core library for the gallery to render correctly!
import { useEditor, EditorContent } from '@tiptap/react'
import StarterKit from '@tiptap/starter-kit'
// 1. Import the extension and the core CSS
import { GalleryExtension } from 'tiptap-extension-gallery-layout'
import 'gallery-layout/style.css'
export default function MyEditor() {
// The way you initialize Tiptap depends on your framework
const editor = useEditor({
extensions: [
StarterKit,
// 2. Add it to your extensions array! Works the same in Vue/Svelte.
GalleryExtension.configure({
// Handle image uploads securely to avoid Base64 performance issues
onUpload: async (files) => {
// Example: Upload to your own server/S3 and return the URL array
// const urls = await myServerUploadService(files);
// return urls;
// For prototyping, you can use ObjectURLs:
return files.map((file) => URL.createObjectURL(file))
},
}),
],
content: '<p>Write your amazing story here...</p>',
})
// 3. Command to insert a gallery programmatically (Identical across all frameworks)
const insertMyGallery = () => {
if (!editor) return
const myImages = [
{ src: '/photo1.jpg', alt: 'Mountain', title: 'Everest' },
{ src: '/photo2.jpg', alt: 'River', title: 'Amazon' },
]
editor.chain().focus().insertGallery(myImages).run()
}
return (
<div>
<button onClick={insertMyGallery}>Insert Gallery</button>
<EditorContent editor={editor} />
</div>
)
}
The best part about the Tiptap extension is its built-in NodeView Toolbar
Once a gallery is inserted, simply click on it inside the editor. A beautiful floating toolbar and settings panel will appear, allowing you and your users to:
+ Image button. This feature includes a custom modal ensuring every new image has proper Alt Text for accessibility+ Image, the library converts the selected files into Base64 strings. However, Base64 is highly discouraged in production as it bloats database size and degrades editor performance.onUpload API): To securely upload images to your own server (e.g., AWS S3, Cloudinary), you should provide an onUpload callback in the extension options. When provided, the library hands the files over to your function and waits for you to return the final image URLs!scroll and grid layouts instantlyextra-small, small, medium, large, extra-large), or set a Custom widthleft, center, or right of the articletop-left, overlay-bottom-center)scroll layout) Enable or disable smooth CSS scroll-snapping so images always perfectly align to the center/edge when swipinggrid layout) Force a specific number of columns instead of using the automatic responsive grid16/9), image gaps, and border radiusgrid and scroll layouts.You don't need to build any custom UI to manage the gallery's appearance; it's completely handled by the extension
If you use the Tiptap extension, you can pass default configurations when registering the extension. These act as the fallback values for all gallery nodes in your editor
| Option | Type | Default | Description |
|---|---|---|---|
defaultLayout |
"scroll" \| "grid" |
"scroll" |
The layout applied to newly inserted galleries |
defaultSize |
"extra-small" \| "small" \| "medium" \| "large" \| "extra-large" |
"medium" |
The size applied to newly inserted galleries |
defaultAlign |
"left" \| "center" \| "right" |
"left" |
Default alignment for the gallery container |
defaultCaptions |
boolean |
true |
Default toggle state for captions |
defaultLightbox |
boolean |
false |
Default toggle state for the lightbox |
defaultLightboxNavigation |
boolean |
false |
Default toggle state for prev/next lightbox navigation (applies when lightbox is enabled) |
defaultGap |
string |
"16px" |
Default CSS gap between images |
defaultRadius |
string |
"4px" |
Default CSS border-radius for images |
defaultCaptionSize |
string |
"14px" |
Default CSS font size for captions |
defaultAspectRatio |
string |
"auto" |
Default CSS aspect ratio |
HTMLAttributes |
object |
{} |
Custom HTML attributes to add to the rendered node |
onUpload |
(files: File[]) => Promise<string[]> |
undefined |
Callback for handling image uploads. If provided, overrides the default Base64 fallback. |
Because this extension uses gallery-layout/style.css, you can customize overlay captions (any captionPosition starting with overlay-) directly in your app's CSS using custom properties on :root, .gallery-layout, or your editor wrapper:
.gallery-layout {
--gallery-overlay-bg: transparent;
--gallery-overlay-text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}
For the full list of supported CSS variables, see the gallery-layout documentation.
MIT
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.