Laravel по-русски

Русское сообщество разработки на PHP-фреймворке Laravel.

Ты не вошёл. Вход тут.

#1 30.04.2021 19:29:37

Image source not readable

Ребята, нужна помощь. Ресурс предусматривает загрузку неких анкет с изображением и они выводится на главной странице. Стала появляться такая ошибка: Image source not readable. До смены сервера и переезда на https все работало. Путь загрузки не менялся. Остальные загрузки работают. Анкеты постятся, но не выводит изображение. Фактически изображения загружаются. В чем может быть проблема?
P.S. подсвечена вот эта строка: Image::make(public_path{'storage/cats/' .$new_path))->resize(250,250)->save(public_path('storage/cats/' $new_path));
Что здесь не так?

Изменено badboyby (30.04.2021 19:36:49)

Не в сети

#2 19.08.2021 16:21:00

Re: Image source not readable

Видимо что-то изменилось - пути возможно. Надо дебажить: если не через xdebug, то выводя промежуточные значения в логи.

P.S. Ох, некропостингом занимаюсь. ))) Спамобот сбил меня с толку, изобразил живую дискуссию.

Изменено artoodetoo (19.08.2021 16:22:08)


There are two hard things in computer science: cache invalidation, naming things, and off-by-one errors.

Не в сети

#3 07.03.2025 12:02:21

Re: Image source not readable

The issue with the "Image source not readable" error likely arises from changes related to the server switch and transition to HTTPS. It could be caused by incorrect file permissions, an inaccurate file path, or the need to adjust for secure asset access under HTTPS. Verify that the directory public/storage/cats/ has the appropriate read/write permissions and confirm the paths used in the public_path() function are correct. Try using secure_asset() to ensure proper image access over HTTPS. Additionally, clear the browser and server caches to rule out any caching issues. Make sure the image processing package (e.g., Intervention Image) is compatible with the new server settings and update or reconfigure it if necessary.

Не в сети

Подвал раздела