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

Original name for image #80

Open
Mandzuk opened this issue Feb 7, 2018 · 3 comments
Open

Original name for image #80

Mandzuk opened this issue Feb 7, 2018 · 3 comments

Comments

@Mandzuk
Copy link

Mandzuk commented Feb 7, 2018

Hi. How can I save the original name of the picture? It`s important for SEO

@Inkognitoo
Copy link

Inkognitoo commented Feb 7, 2018

Method attachImage takes three argument: absolute path to file (string), is it main image (bool) and original name for file (string).
For example:
$model->attachImage('/tmp/dsftsdf.png', false, 'It is image original name')

@Mandzuk
Copy link
Author

Mandzuk commented Feb 8, 2018

Thank you. But I'm more interested the name of the file. I added a name, the name is saved in the table http://joxi.ru/zAN41wMtlWkLZm . But the link remains http://joxi.ru/DmB4d9gtNDMyMA . And I need, that would be in the link to the file my name was written

@erzhigit
Copy link

erzhigit commented Mar 17, 2018

I did it like this!
in model
$name = $this->image->baseName;
$this->attachImage($path,$isMain,$name);

in view.php
add attribute alt
alt='{$img->name}',

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

No branches or pull requests

3 participants