The BunnyCDN adapter allows you to manage your media files in shopware on a bunnyCDN-Storage.
Download the plugin from the release page and enable it in shopware.
-
Upload your existing media-folder using ftp to BunnyCDN.
-
Update your
config/packages/shopware.yml
and fill in your own valuesSW6.3 inherits config of all new filesystems from public. So we have to set every filesystem on its own.
Here is a example to use Storage for media and sitemap. Due to performance-Issues, we don't recommend using CDN-Storage for theme or asset.shopware: cdn: url: "https://example.b-cdn.net" filesystem: public: &bunnycdn type: "bunnycdn" url: "https://example.b-cdn.net" config: apiUrl: "https://storage.bunnycdn.com/example/" apiKey: "secret-ftp-password" sitemap: <<: *bunnycdn theme: type: "local" url: "" config: root: "%kernel.project_dir%/public" asset: type: "local" url: "" config: root: "%kernel.project_dir%/public"
shopware: filesystem: public: type: "bunnycdn" config: apiUrl: "https://storage.bunnycdn.com/example/" apiKey: "secret-ftp-password" cdn: url: "https://example.b-cdn.net"
Due to performance problems and missing implementation in core, you shouldn't transfer the theme to bunnycdn. To achive this, you have to add this, to the
shopware.yml
-file:parameters: filesystem_local_public: type: 'local' config: root: '%kernel.project_dir%/public' services: filesystem.local.public: class: 'League\Flysystem\FilesystemInterface' factory: ['@Shopware\Core\Framework\Adapter\Filesystem\FilesystemFactory', 'factory'] arguments: - '%filesystem_local_public%' Shopware\Storefront\Theme\ThemeCompiler: arguments: - '@filesystem.local.public' - '@shopware.filesystem.temp' - '@Shopware\Storefront\Theme\ThemeFileResolver' - '%kernel.cache_dir%' - '%kernel.debug%' - '@Symfony\Component\EventDispatcher\EventDispatcherInterface' - '@Shopware\Storefront\Theme\ThemeFileImporter' Shopware\Core\Framework\Plugin\Util\AssetService: arguments: - '@filesystem.local.public' - '@kernel' - '@Shopware\Core\Framework\Plugin\KernelPluginCollection'
parameters: filesystem_local_public: type: 'local' config: root: '%kernel.project_dir%/public' services: filesystem.local.public: class: 'League\Flysystem\FilesystemInterface' factory: ['@Shopware\Core\Framework\Adapter\Filesystem\FilesystemFactory', 'factory'] arguments: - '%filesystem_local_public%' Shopware\Storefront\Theme\ThemeCompiler: arguments: - '@filesystem.local.public' - '@shopware.filesystem.temp' - '@Shopware\Storefront\Theme\ThemeFileResolver' - '%kernel.cache_dir%' - '%kernel.debug%' - '@Symfony\Component\EventDispatcher\EventDispatcherInterface' - '@Shopware\Storefront\Theme\ThemeFileImporter' - '@media.repository' Shopware\Core\Framework\Plugin\Util\AssetService: arguments: - '@filesystem.local.public' - '@kernel' - '@Shopware\Core\Framework\Plugin\KernelPluginCollection'
The MIT License (MIT). Please see License File for more information.