- Posts: 5
COMMUNITY FORUM
K2 images keep original filename
- Teodor Ovcharov
-
Topic Author
- Offline
- New Member
Less
More
11 years 10 months ago #116825
by Teodor Ovcharov
K2 images keep original filename was created by Teodor Ovcharov
Hello,
I've a developed website using K2 and we're working on the SEO. The client insist on having custom images name, so I would like to get rid of the md5 hash that renames the files, so that the "original name + size" would be all that makes image name (original-image-name-size.jpg).
I found a modification that uses the "alias" field + id to make the image name, so it get's rid of the md5 if that would be of any help:
www.gavick.com/forums/general-discussion/seo-k2-image-18208.html
Please help me with this one !
Thank you !
Best Regards,
I've a developed website using K2 and we're working on the SEO. The client insist on having custom images name, so I would like to get rid of the md5 hash that renames the files, so that the "original name + size" would be all that makes image name (original-image-name-size.jpg).
I found a modification that uses the "alias" field + id to make the image name, so it get's rid of the md5 if that would be of any help:
www.gavick.com/forums/general-discussion/seo-k2-image-18208.html
Please help me with this one !
Thank you !
Best Regards,
Please Log in or Create an account to join the conversation.
- Johan
-
- Offline
- Junior Member
Less
More
- Posts: 26
11 years 10 months ago #116826
by Johan
Replied by Johan on topic Re: K2 images keep original filename
Where are you struggling? There is a solution posted on that page.
Please Log in or Create an account to join the conversation.
- Teodor Ovcharov
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 5
11 years 10 months ago #116827
by Teodor Ovcharov
Replied by Teodor Ovcharov on topic Re: K2 images keep original filename
Hello,
The solution uses "alias" field as a part of the image file name, while I would like it to be the original file name as it was before uploading.
Thank you !
The solution uses "alias" field as a part of the image file name, while I would like it to be the original file name as it was before uploading.
Thank you !
Please Log in or Create an account to join the conversation.
- Johan
-
- Offline
- Junior Member
Less
More
- Posts: 26
11 years 10 months ago #116828
by Johan
Replied by Johan on topic Re: K2 images keep original filename
This is not great by the way and you can encounter a lot of problems with spaces and formatting in image names.
Try this: $handle->file_new_name_body = "Image" . $row->id;
Try this: $handle->file_new_name_body = "Image" . $row->id;
Please Log in or Create an account to join the conversation.
- Teodor Ovcharov
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 5
11 years 10 months ago #116829
by Teodor Ovcharov
Replied by Teodor Ovcharov on topic Re: K2 images keep original filename
Please do give more information on where to put it and if I have to modify other files as well, because it is not very clear to me.
Thank you !
Thank you !
Please Log in or Create an account to join the conversation.