Keyword

K2 images keep original filename

  • Teodor Ovcharov
  • Teodor Ovcharov's Avatar Topic Author
  • Offline
  • New Member
More
11 years 1 month 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,

Please Log in or Create an account to join the conversation.

More
11 years 1 month 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
  • Teodor Ovcharov's Avatar Topic Author
  • Offline
  • New Member
More
11 years 1 month 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 !

Please Log in or Create an account to join the conversation.

More
11 years 1 month 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;

Please Log in or Create an account to join the conversation.

  • Teodor Ovcharov
  • Teodor Ovcharov's Avatar Topic Author
  • Offline
  • New Member
More
11 years 1 month 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 !

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum