All images path are wrong after switching server

Hi all,

I’ve recently moved my (work in progress) website, from my local enviroment to an online enviroment. And currently all images are missing due to having new image paths.

For example: Locally the logo URL is:
http://localhost/media/84/17/65/1615642104/logo.svg

Online the image url is:
http://domeinexample.nl/media/72/ec/8f/1615642104/logo.svg

I’ve tried it twice now, but the result is the same :frowning:

Any suggestions?

Which media strategy do you use in the .env file? Is it the same on both servers?

There’s no real difference between the two, atleast nothing media related or what should cause this as far as I know…

Local:
APP_ENV=dev
APP_SECRET=1
INSTANCE_ID=1
DATABASE_URL=mysql://xxx:xxx@localhost:3306/shopware
APP_URL=http://localhost
MAILER_URL=smtp://localhost:1025
COMPOSER_HOME=/var/www/html/var/cache/composer
SHOPWARE_ES_ENABLED=0

Online:
APP_ENV=prod
APP_SECRET=xxx
APP_URL=http://xxx.domain.com
MAILER_URL=null://localhost
DATABASE_URL=mysql://xxxx@localhost:3306/shopware
COMPOSER_HOME=/data/web/shopware/var/cache/composer
INSTANCE_ID=xxx
BLUE_GREEN_DEPLOYMENT=1
SHOPWARE_HTTP_CACHE_ENABLED=1
SHOPWARE_HTTP_DEFAULT_TTL=7200
SHOPWARE_ES_HOSTS=""
SHOPWARE_ES_ENABLED=„0“
SHOPWARE_ES_INDEXING_ENABLED=„0“
SHOPWARE_ES_INDEX_PREFIX=„sw“
SHOPWARE_CDN_STRATEGY_DEFAULT=„id“

SHOPWARE_CDN_STRATEGY_DEFAULT=„id“

Hi,

thanks for that reply, I’ve removed the line, but nothing changed after clearing the cache, should I do something else ?

instead of deleting try. This sets different strategy for creating pic preferences
SHOPWARE_CDN_STRATEGY_DEFAULT=physical_filename
or
SHOPWARE_CDN_STRATEGY_DEFAULT=filename

Do you mean on my development enviroment? Or on the production?

I haven’t set anything currently on development and production (removed the line there),

do I need to ‚do‘ anything to re-create the imagepaths after changing this setting? (development currently has a similar syntax, but with different folders/numbers in it)

Ah that fixed it!

Had to restart the enviroment for the changes to have effect. Thanks!

1 „Gefällt mir“

actually i was thinking about the same.. .

I have the same problem right now. How can i fix this issue, when i never changed the .env file?

1 „Gefällt mir“