Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not showing images on view page after yii2 update #90

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Not showing images on view page after yii2 update #90

wants to merge 1 commit into from

Conversation

rustam-mukhametshin
Copy link

In src of image url /yii2images changes into /somedigit, after yii2 latest update.

If patch wont be accepted, and if you dont want to create own package, feel free to use/modify this code.

function fixImages($string) { $replacement = '/yii2images/images/'; $pattern = preg_match('/placeHolder/', $string) ? '/\/images\//' : '/\/(\d+)\/images\//'; return preg_replace($pattern, $replacement, $string); }

I.e. fixImages($model->getImage()->getUrl()) or with getImages

Sorry for my English, and my php experience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant