Manage product images and media files with Spatie Media Library
Shopper supports assigning images to products, variants, brands, collections and categories. It is an additional layer provided
by the framework with the help of the Spatie Media Library
Configuration
The config/shopper/media.php file allows you to customize how media files are handled. Below are the available configuration options:
Storage Disk
Specifies the storage disk used to save media files. By default, Shopper uses the public disk, but you can change
it to use services like S3, Cloudinary, or other storage systems. Since the file system is based on the Spatie Laravel Media Library,
you also need to define the name of the collection of images and thumbnails for your Models.
Since v2.11.2, this allowlist governs every image upload in the admin panel: media collections on products, variants, brands, collections and categories, and also the account avatar and the store logo and cover in the settings. Before v2.11.2, those three settings fields accepted any image/* type regardless of this configuration.
SVG is deliberately excluded from the default list. An SVG file can embed scripts that execute when the file is opened from your storage URL, which allows a staff account to attack an administrator session. Only add image/svg+xml back if you understand and accept that risk.
Media Filesize
Sets the maximum allowed file size for media uploads (in kilobytes). This helps control file sizes to avoid performance issues.
'max_size' => [ 'thumbnail' => 1024, // Default size for thumbnail image (1MB). 'images' => 2048, // Default size for individual collection image for product (2MB)]
Image Conversions
Configures image conversions to generate resized or optimized versions of uploaded images. For example,
you can create thumbnails or mobile-friendly images.
Shopper registers image conversions from the config/shopper/media.phpconversions array. By default, two conversions are available: large (800x800) and medium (500x500). All conversions use Fit::Fill and preserve the original image format.To add custom conversions, add entries to the conversions config:
If you need further customization, configure a custom disk in config/filesystems.php and update the disk_name in config/shopper/media.php. See the Laravel Filesystem documentation for details.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"TALL Stack E-commerce Framework","description":"Headless e-commerce administration built with Laravel to create and manage online store.","colors":{"primary":"#2563eb","light":"#1C4ED8","dark":"#3b82f6"},"logo":{"light":"https://mintcdn.com/shopperlabs-ee054f5e/MAy8xASMPZl80tbO/logo/logo.svg?fit=max\u0026auto=format\u0026n=MAy8xASMPZl80tbO\u0026q=85\u0026s=13cf7e39ed8c3160abca915c2970bc73","dark":"https://mintcdn.com/shopperlabs-ee054f5e/MAy8xASMPZl80tbO/logo/logo.svg?fit=max\u0026auto=format\u0026n=MAy8xASMPZl80tbO\u0026q=85\u0026s=13cf7e39ed8c3160abca915c2970bc73"},"favicon":"https://mintcdn.com/shopperlabs-ee054f5e/4fs9dK0GWIOvGSBD/favicon.svg?fit=max\u0026auto=format\u0026n=4fs9dK0GWIOvGSBD\u0026q=85\u0026s=baa63a3996a71110a8d6c7cba33c42a2","navbar":{"links":[{"href":"https://github.com/shopperlabs/shopper","type":"github"}]},"footer":{"socials":{"x":"https://x.com/laravelshopper","github":"https://github.com/shopperlabs"}},"seo":{"metatags":{"og:image":"/images/socialcard.png"}},"integrations":{"ga4":{"measurementId":"G-NNZ07903B6"},"plausible":{"domain":"laravelshopper.dev","server":"analytics.universy.app"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Community","icon":"discord","href":"https://discord.gg/r4VUvHm34"},{"anchor":"Blog","icon":"newspaper","href":"https://laravelshopper.dev/blog"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"shopperlabs-ee054f5e","hasAudioNarration":false,"actualSubdomain":"shopperlabs-ee054f5e","customDomains":["docs.laravelshopper.dev"],"gitSource":{"type":"github","owner":"shopperlabs","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":"","_id":"6b10c6769ffae5051c4071f8"},"entitlements":{},"buildId":"6ae9426b2c6612057858d433:success","clientVersion":"0.0.4453","searchFilterCounts":[{"language":"default","tag":"Documentation","count":50},{"language":"default","tag":"User Guide","count":32},{"language":"default","tag":"Extending","count":25},{"language":"default","tag":"Catalog","count":22},{"language":"default","tag":"Store Setup","count":14},{"language":"default","tag":"Components","count":12},{"language":"default","tag":"Control Panel","count":10},{"language":"default","tag":"Getting Started","count":10},{"language":"default","tag":"Sales","count":10},{"language":"default","tag":"Releases","count":10}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"auth-vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"/* latin-ext */\n@font-face {\n font-family: 'Instrument Sans';\n font-style: normal;\n font-weight: 400 500;\n font-stretch: 100%;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/instrumentsans/v4/pxiTypc9vsFDm051Uf6KVwgkfoSxQ0GsQv8ToedPibnr0She1YmV.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Instrument Sans';\n font-style: normal;\n font-weight: 400 500;\n font-stretch: 100%;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/instrumentsans/v4/pxiTypc9vsFDm051Uf6KVwgkfoSxQ0GsQv8ToedPibnr0SZe1Q.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* cyrillic-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 300 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrodmgPn.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 300 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrMdmgPn.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* symbols2 */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 300 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFg08vz7ehw.woff2) format('woff2');\n unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 300 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrgdmgPn.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 300 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrkdmgPn.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 300 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrcdmg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n:root{--gray-50: 250 250 250;--gray-100: 244 244 245;--gray-200: 228 228 231;--gray-300: 212 212 216;--gray-400: 161 161 170;--gray-500: 113 113 122;--gray-600: 82 82 91;--gray-700: 63 63 70;--gray-800: 39 39 42;--gray-900: 24 24 27;--gray-950: 9 9 11}body{font-family:'Instrument Sans';font-weight:400}h1,h2,h3,h4{font-weight:500!important;letter-spacing:-0.025rem!important}code,pre{font-family:'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Monaco,\n Consolas, 'Liberation Mono', 'Courier New', monospace}b,strong,.font-semibold{font-weight:500!important}.prose :where(a):not(:where([class~=\"not-prose\"],[class~=\"not-prose\"] *)){font-weight:500!important;color:rgb(var(--primary-light))!important}.codeblock-dark div:not(:last-child){color:#fafafa}.sh-preview{border:1px solid rgb(var(--gray-200));border-radius:0.75rem;overflow:hidden}.sh-preview-content{background-color:#ffffff;padding:1rem}.dark .sh-preview{border-color:rgba(255, 255, 255, 0.1)}.dark .sh-preview-content{background-color:rgb(var(--gray-950))}.sh-card-outer{padding:0.375rem;background-color:rgb(var(--gray-50));border-radius:0.5rem;box-shadow:inset 0 0 0 1px rgb(var(--gray-200))}.sh-card-header{padding:0.75rem 0.5rem}.sh-card-title{display:block;font-weight:600;color:rgb(var(--gray-950))}.sh-card-description{display:block;margin-top:0.25rem;font-size:0.875rem;color:rgb(var(--gray-500))}.sh-card-inner{background-color:#ffffff;box-shadow:inset 0 0 0 1px rgb(var(--gray-200));border-radius:0.5rem;padding:1rem}.dark .sh-card-outer{background-color:rgb(var(--gray-950));box-shadow:inset 0 0 0 1px rgba(255, 255, 255, 0.1)}.dark .sh-card-title{color:#ffffff}.dark .sh-card-description{color:rgb(var(--gray-400))}.dark .sh-card-inner{background-color:rgb(var(--gray-900));box-shadow:inset 0 0 0 1px rgba(255, 255, 255, 0.1)}.sh-alert{border-radius:0.5rem;padding:1rem}.sh-alert-info{background-color:#eff6ff;box-shadow:inset 0 0 0 1px #bfdbfe}.sh-alert-danger{background-color:#fef2f2;box-shadow:inset 0 0 0 1px #fecaca}.sh-alert-success{background-color:#f0fdf4;box-shadow:inset 0 0 0 1px #bbf7d0}.sh-alert-warning{background-color:#fffbeb;box-shadow:inset 0 0 0 1px #fde68a}.dark .sh-alert-info{background-color:rgba(59, 130, 246, 0.15);box-shadow:inset 0 0 0 1px rgba(59, 130, 246, 0.3)}.dark .sh-alert-danger{background-color:rgba(239, 68, 68, 0.15);box-shadow:inset 0 0 0 1px rgba(239, 68, 68, 0.3)}.dark .sh-alert-success{background-color:rgba(34, 197, 94, 0.15);box-shadow:inset 0 0 0 1px rgba(34, 197, 94, 0.3)}.dark .sh-alert-warning{background-color:rgba(245, 158, 11, 0.15);box-shadow:inset 0 0 0 1px rgba(245, 158, 11, 0.3)}.sh-heading{font-size:1.875rem;font-weight:700;color:rgb(var(--gray-900))}.dark .sh-heading{color:#ffffff}.sh-section-title{display:block;font-weight:600;color:rgb(var(--gray-950))}.sh-section-description{display:block;margin-top:0.25rem;font-size:0.875rem;color:rgb(var(--gray-500))}.dark .sh-section-title{color:#ffffff}.dark .sh-section-description{color:rgb(var(--gray-400))}.sh-empty-icon-bg{width:10rem;height:10rem;border-radius:0.75rem;background-color:rgb(var(--gray-100));display:flex;align-items:center;justify-content:center}.sh-empty-icon{width:4rem;height:4rem;color:rgb(var(--gray-400))}.sh-empty-title{display:block;font-size:1.5rem;font-weight:500;color:rgb(var(--gray-900))}.sh-empty-content{display:block;margin-top:1rem;font-size:1rem;color:rgb(var(--gray-500))}.dark .sh-empty-icon-bg{background-color:rgb(var(--gray-800))}.dark .sh-empty-title{color:#ffffff}.dark .sh-empty-content{color:rgb(var(--gray-400))}.sh-btn{display:inline-flex;align-items:center;font-weight:500;border-radius:0.5rem;cursor:pointer;padding:0.5rem 1rem;font-size:0.875rem}.sh-btn-primary{color:#ffffff;background-color:#2563eb;border:none}.sh-btn-secondary{color:rgb(var(--gray-700));background-color:#ffffff;border:1px solid rgb(var(--gray-300))}.dark .sh-btn-secondary{color:rgb(var(--gray-300));background-color:rgb(var(--gray-800));border-color:rgb(var(--gray-700))}.sh-empty-card{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:2.5rem 2rem;text-align:center}.sh-empty-card-icon{display:flex;width:3rem;height:3rem;align-items:center;justify-content:center;border-radius:9999px;background-color:rgb(var(--gray-100));color:rgb(var(--gray-700))}.sh-empty-card-heading{display:block;font-weight:500;color:rgb(var(--gray-900))}.sh-empty-card-description{display:block;margin-top:0.25rem;max-width:32rem;font-size:0.875rem;color:rgb(var(--gray-500))}.dark .sh-empty-card-icon{background-color:rgb(var(--gray-900));color:#ffffff}.dark .sh-empty-card-heading{color:#ffffff}.dark .sh-empty-card-description{color:rgb(var(--gray-400))}.sh-stock-badge{display:inline-flex;border-radius:9999px;padding:0 0.375rem;font-size:0.75rem;line-height:1.25rem;font-weight:600}.sh-stock-badge-low{background-color:#fee2e2;color:#991b1b}.sh-stock-badge-ok{background-color:#dcfce7;color:#166534}.sh-loader{width:1.25rem;height:1.25rem;animation:spin 1s linear infinite}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.sh-label{display:block;font-size:0.875rem;font-weight:500;color:rgb(var(--gray-700))}.sh-label-required{color:#ef4444}.dark .sh-label{color:rgb(var(--gray-300))}.sh-user-avatar{display:flex;align-items:center;gap:0.5rem}.sh-user-avatar-img{width:2rem;height:2rem;border-radius:9999px;object-fit:cover}.sh-user-avatar-name{font-size:0.875rem;font-weight:500;color:rgb(var(--gray-700))}.dark .sh-user-avatar-name{color:rgb(var(--gray-300))}"}]}
{"page":{"pagePath":"v2/media","slug":"/v2/media","pageMetadata":{"title":"Media","description":"Manage product images and media files with Spatie Media Library","href":"/v2/media"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Manage product images and media files with Spatie Media Library\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Shopper supports assigning images to products, variants, brands, collections and categories. It is an additional layer provided\nby the framework with the help of the `,_jsx(_components.a,{href:`https://spatie.be/v2/laravel-medialibrary`,children:`Spatie Media Library`})]}),`\n`,_jsx(Heading,{level:`2`,id:`configuration`,children:`Configuration`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`config/shopper/media.php`}),` file allows you to customize how media files are handled. Below are the available configuration options:`]}),`\n`,_jsx(Heading,{level:`3`,id:`storage-disk`,children:`Storage Disk`}),`\n`,_jsxs(_components.p,{children:[`Specifies the storage disk used to save media files. By default, Shopper uses the `,_jsx(_components.code,{children:`public`}),` disk, but you can change\nit to use services like S3, Cloudinary, or other storage systems. Since the file system is based on the Spatie Laravel Media Library,\nyou also need to define the name of the collection of images and thumbnails for your Models.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`php`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`php`,children:_jsxs(_components.code,{language:`php`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'storage'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'collection_name'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'uploads'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'thumbnail_collection'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'thumbnail'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'disk_name'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'public'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`accepts-mime-types`,children:`Accepts Mime Types`}),`\n`,_jsx(_components.p,{children:`Lists the MIME types allowed for media files. This ensures that only specified file formats can be uploaded. For your need you can add more types.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`php`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`php`,children:_jsxs(_components.code,{language:`php`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'accepts_mime_types'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'image/jpeg'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'image/png'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'image/webp'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'image/avif'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Since v2.11.2, this allowlist governs every image upload in the admin panel: media collections on products, variants, brands, collections and categories, and also the account avatar and the store logo and cover in the settings. Before v2.11.2, those three settings fields accepted any `,_jsx(_components.code,{children:`image/*`}),` type regardless of this configuration.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`SVG is deliberately excluded from the default list. An SVG file can embed scripts that execute when the file is opened from your storage URL, which allows a staff account to attack an administrator session. Only add `,_jsx(_components.code,{children:`image/svg+xml`}),` back if you understand and accept that risk.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`media-filesize`,children:`Media Filesize`}),`\n`,_jsx(_components.p,{children:`Sets the maximum allowed file size for media uploads (in kilobytes). This helps control file sizes to avoid performance issues.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`php`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`php`,children:_jsxs(_components.code,{language:`php`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'max_size'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'thumbnail'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1024`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Default size for thumbnail image (1MB).`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'images'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 2048`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Default size for individual collection image for product (2MB)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`image-conversions`,children:`Image Conversions`}),`\n`,_jsx(_components.p,{children:`Configures image conversions to generate resized or optimized versions of uploaded images. For example,\nyou can create thumbnails or mobile-friendly images.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`php`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`php`,children:_jsxs(_components.code,{language:`php`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'conversions'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'large'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'width'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 800`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'height'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 800`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'medium'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'width'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 500`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'height'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 500`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`image-conversions-2`,children:`Image Conversions`}),`\n`,_jsxs(_components.p,{children:[`Shopper registers image conversions from the `,_jsx(_components.code,{children:`config/shopper/media.php`}),` `,_jsx(_components.code,{children:`conversions`}),` array. By default, two conversions are available: `,_jsx(_components.code,{children:`large`}),` (800x800) and `,_jsx(_components.code,{children:`medium`}),` (500x500). All conversions use `,_jsx(_components.code,{children:`Fit::Fill`}),` and preserve the original image format.`]}),`\n`,_jsxs(_components.p,{children:[`To add custom conversions, add entries to the `,_jsx(_components.code,{children:`conversions`}),` config:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`php`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`php`,children:_jsxs(_components.code,{language:`php`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'conversions'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'large'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'width'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 800`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'height'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 800`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'medium'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'width'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 500`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'height'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 500`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'small'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'width'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 200`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'height'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 200`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`retrieving-images`,children:`Retrieving Images`}),`\n`,_jsx(_components.p,{children:`To get the thumbnail URL for a product, brand, or collection:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`php`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`php`,children:_jsxs(_components.code,{language:`php`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$collection`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` config`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'shopper.media.storage.thumbnail_collection'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$product`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getFirstMediaUrl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$collection`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$product`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getFirstMediaUrl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$collection`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'medium'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`To get gallery images:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`php`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`php`,children:_jsxs(_components.code,{language:`php`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$collection`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` config`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'shopper.media.storage.collection_name'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$product`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getMedia`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$collection`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$product`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getFirstMediaUrl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$collection`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`advanced-customization`,children:`Advanced Customization`}),`\n`,_jsxs(_components.p,{children:[`If you need further customization, configure a custom disk in `,_jsx(_components.code,{children:`config/filesystems.php`}),` and update the `,_jsx(_components.code,{children:`disk_name`}),` in `,_jsx(_components.code,{children:`config/shopper/media.php`}),`. See the `,_jsx(_components.a,{href:`https://laravel.com/docs/filesystem`,children:`Laravel Filesystem documentation`}),` for details.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Media","description":"Manage product images and media files with Spatie Media Library","href":"/v2/media"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Configuration","slug":"configuration","depth":2,"children":[{"title":"Storage Disk","slug":"storage-disk","depth":3,"children":[]},{"title":"Accepts Mime Types","slug":"accepts-mime-types","depth":3,"children":[]},{"title":"Media Filesize","slug":"media-filesize","depth":3,"children":[]},{"title":"Image Conversions","slug":"image-conversions","depth":3,"children":[]}]},{"title":"Image Conversions","slug":"image-conversions-2","depth":2,"children":[]},{"title":"Retrieving Images","slug":"retrieving-images","depth":2,"children":[]},{"title":"Advanced Customization","slug":"advanced-customization","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"shopperlabs-ee054f5e","siteName":"TALL Stack E-commerce Framework","title":"Media - TALL Stack E-commerce Framework","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{"1.x":{"href":"/v1/media","matchLevel":1},"2.x":{"href":"/v2/media","matchLevel":0}},"firstHrefInLanguage":{}},"lastModified":"2026-08-17T09:37:03.498Z","originalFileLocation":"v2/media.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Manage product images and media files with Spatie Media Library\">\u003cmeta data-mint-head name=\"application-name\" content=\"TALL Stack E-commerce Framework\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/shopperlabs-ee054f5e/ZLu1g3jkrJ7cL-_x/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/shopperlabs-ee054f5e/ZLu1g3jkrJ7cL-_x/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/shopperlabs-ee054f5e/ZLu1g3jkrJ7cL-_x/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/shopperlabs-ee054f5e/ZLu1g3jkrJ7cL-_x/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/shopperlabs-ee054f5e/ZLu1g3jkrJ7cL-_x/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/shopperlabs-ee054f5e/ZLu1g3jkrJ7cL-_x/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/shopperlabs-ee054f5e/ZLu1g3jkrJ7cL-_x/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/shopperlabs-ee054f5e/ZLu1g3jkrJ7cL-_x/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/shopperlabs-ee054f5e/ZLu1g3jkrJ7cL-_x/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Media - TALL Stack E-commerce Framework\">\u003cmeta data-mint-head property=\"og:description\" content=\"Manage product images and media files with Spatie Media Library\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"TALL Stack E-commerce Framework\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.laravelshopper.dev/v2/media\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://shopperlabs-ee054f5e.mintlify.site/images/socialcard.png\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Media - TALL Stack E-commerce Framework\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Manage product images and media files with Spatie Media Library\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://shopperlabs-ee054f5e.mintlify.site/images/socialcard.png\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/shopperlabs-ee054f5e/ZLu1g3jkrJ7cL-_x/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"TALL Stack E-commerce Framework\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2563eb\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.laravelshopper.dev/v2/media\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/v2/media.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.laravelshopper.dev/#organization\",\"name\":\"TALL Stack E-commerce Framework\",\"url\":\"https://docs.laravelshopper.dev\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/shopperlabs-ee054f5e/MAy8xASMPZl80tbO/logo/logo.svg?fit=max\u0026auto=format\u0026n=MAy8xASMPZl80tbO\u0026q=85\u0026s=13cf7e39ed8c3160abca915c2970bc73\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.laravelshopper.dev#website\",\"name\":\"TALL Stack E-commerce Framework\",\"url\":\"https://docs.laravelshopper.dev\",\"publisher\":{\"@id\":\"https://docs.laravelshopper.dev/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.laravelshopper.dev/v2/media#webpage\",\"url\":\"https://docs.laravelshopper.dev/v2/media\",\"name\":\"Media\",\"description\":\"Manage product images and media files with Spatie Media Library\",\"dateModified\":\"2026-08-17T09:37:03.498Z\",\"isPartOf\":{\"@id\":\"https://docs.laravelshopper.dev#website\"},\"breadcrumb\":{\"@id\":\"https://docs.laravelshopper.dev/v2/media#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.laravelshopper.dev/v2/media#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"System\",\"item\":\"https://docs.laravelshopper.dev/v2/carriers\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Media\",\"item\":\"https://docs.laravelshopper.dev/v2/media\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.laravelshopper.dev/v2/media#article\",\"headline\":\"Media\",\"name\":\"Media\",\"description\":\"Manage product images and media files with Spatie Media Library\",\"url\":\"https://docs.laravelshopper.dev/v2/media\",\"mainEntityOfPage\":{\"@id\":\"https://docs.laravelshopper.dev/v2/media#webpage\"},\"image\":\"https://docs.laravelshopper.dev/images/socialcard.png\",\"dateModified\":\"2026-08-17T09:37:03.498Z\",\"publisher\":{\"@id\":\"https://docs.laravelshopper.dev/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.laravelshopper.dev#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"TALL Stack E-commerce Framework\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"TALL Stack E-commerce Framework\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/v2/media.md","siteName":"TALL Stack E-commerce Framework","nav":{"global":{"anchors":[{"anchor":"Community","icon":"discord","href":"https://discord.gg/r4VUvHm34"},{"anchor":"Blog","icon":"newspaper","href":"https://laravelshopper.dev/blog"}]},"versions":[{"version":"1.x","pages":[{"title":"1.x","href":"/v1/media"}]},{"version":"2.x","tabs":[{"tab":"User Guide","pages":[{"title":"User Guide","href":"/v2/user-guide/getting-started/introduction"}]},{"tab":"Documentation","groups":[{"group":"Prologue","pages":[{"title":"Introduction","href":"/v2/getting-started"},{"title":"Demo Store","href":"/v2/demo-store"},{"title":"Contribution Guide","href":"/v2/contributing"}]},{"group":"Getting Started","pages":[{"title":"Requirements","href":"/v2/requirements"},{"title":"Installation","href":"/v2/installation"},{"title":"Configuration","href":"/v2/configuration"},{"title":"Dashboard","href":"/v2/dashboard"}]},{"group":"Catalog","pages":[{"title":"Products","href":"/v2/products"},{"title":"Product Variants","href":"/v2/product-variants"},{"title":"Product Tags","href":"/v2/product-tags"},{"title":"Pricing","href":"/v2/pricing"},{"title":"Brands","href":"/v2/brands"},{"title":"Categories","href":"/v2/categories"},{"title":"Collections","href":"/v2/collections"},{"title":"Attributes","href":"/v2/attributes"},{"title":"Reviews","href":"/v2/reviews"}]},{"group":"Sales","pages":[{"title":"Customers","href":"/v2/customers"},{"title":"Cart","href":"/v2/cart"},{"title":"Discounts","href":"/v2/discounts"},{"title":"Orders","href":"/v2/orders"},{"title":"Payments","href":"/v2/payments"},{"title":"Fulfillment","href":"/v2/fulfillment"},{"title":"Taxes","href":"/v2/taxes"}]},{"group":"Store Setup","pages":[{"title":"Setup Store","href":"/v2/setup-store"},{"title":"Channels","href":"/v2/channels"},{"title":"Zones","href":"/v2/zones"},{"title":"Locations","href":"/v2/locations"},{"title":"Currencies","href":"/v2/currencies"},{"title":"Legal","href":"/v2/legal"}]},{"group":"System","pages":[{"title":"Carriers","href":"/v2/carriers"},{"title":"Payment Methods","href":"/v2/payment-methods"},{"title":"Suppliers","description":"Complete reference for the Supplier model, product sourcing, and dropshipping integration in Shopper.","href":"/v2/suppliers"},{"title":"Media","href":"/v2/media"},{"title":"Roles \u0026 Permissions","description":"Manage user access control programmatically with Spatie Laravel Permission.","href":"/v2/acl"},{"title":"Two Factor Authentication","href":"/v2/two-factor"},{"title":"Events","href":"/v2/events"}]},{"group":"Storefront","pages":[{"title":"Starter Kits","href":"/v2/starter-kits"},{"title":"Livewire Starter Kit","sidebarTitle":"Livewire","href":"/v2/livewire-starter-kit"},{"title":"React Starter Kit","sidebarTitle":"React","href":"/v2/react-starter-kit"},{"title":"Vue Starter Kit","sidebarTitle":"Vue","href":"/v2/vue-starter-kit"}]},{"group":"Releases","pages":[{"group":"Upgrade Guide","pages":[{"title":"Upgrade Guide","href":"/v2/upgrade"},{"title":"From v2.9 to v2.10","href":"/v2/upgrade/v2-9-to-v2-10"},{"title":"From v2.8 to v2.9","href":"/v2/upgrade/v2-8-to-v2-9"},{"title":"From v2.7 to v2.8","href":"/v2/upgrade/v2-7-to-v2-8"},{"title":"From v2.6 to v2.7","href":"/v2/upgrade/v2-6-to-v2-7"},{"title":"From v2.5 to v2.6","href":"/v2/upgrade/v2-5-to-v2-6"},{"title":"From v2.4 to v2.5","href":"/v2/upgrade/v2-4-to-v2-5"},{"title":"From v2.2 to v2.3","href":"/v2/upgrade/v2-2-to-v2-3"},{"title":"From v2.1 to v2.2","href":"/v2/upgrade/v2-1-to-v2-2"}]},{"title":"Version Support Policy","href":"/v2/version-support-policy"}]}]},{"tab":"Extending","pages":[{"title":"Extending","href":"/v2/extending/overview"}]},{"tab":"Addons","pages":[{"title":"Addons","href":"/v2/addons/stripe"}]},{"tab":"Reference","pages":[{"title":"Reference","href":"/v2/reference/typescript-types"}]}]}]},"basePath":"","title":"Media - TALL Stack E-commerce Framework","deploymentId":"dpl_BLZw3QngerHodH9E8mGgC4v752y3","buildId":"dpl_BLZw3QngerHodH9E8mGgC4v752y3","dynamics":[],"chunks":[]}