Joomla/K2 replaces some characters in the filename when uploading/saving the image:
It is not joomla/K2, but the way the file upload class used by k2 from verot.net that strip special character like dash and empty space for underscore. For your case just go to administrator/components/com_k2/models/item.php and in every image creation (//Original image, //XLarge image etc...) add:
$handle->file_safe_name = false;
And magic dashes are back, no much point of going seo and having only underscores and not dashes as all know.
Just be sure that when you write the image name to use only characters allowed so that the image link works.
You can learn more here about options of the upload class:
www.verot.net/php_class_upload_docs.htm
Anyhow thanks for the post as it saved me a bit of time looking into it,
Now the preview image disapears in admin (it calls a item->thumb and not normal images, just have to find where it is and we have a complete k2 seo image optimization.) If anyone has a tip here, it is welcome.
Markus Amanto said:
One additional thing I noticed in the process. Joomla/K2 replaces some characters in the filename when uploading/saving the image which messed it up a bit for me at first, but in case that happens to you, you can use an ftp program to check the image folder and see what name your files have been given and then just make sure that what you have entered in the "Item image credits" matches that.
For example in my case it replaces my dashes that I first entered in the filename with underscores.
It is not joomla/K2, but the way the file upload class used by k2 from verot.net that strip special character like dash and empty space for underscore. For your case just go to administrator/components/com_k2/models/item.php and in every image creation (//Original image, //XLarge image etc...) add:
$handle->file_safe_name = false;
And magic dashes are back, no much point of going seo and having only underscores and not dashes as all know.
Just be sure that when you write the image name to use only characters allowed so that the image link works.
You can learn more here about options of the upload class:
www.verot.net/php_class_upload_docs.htm
Anyhow thanks for the post as it saved me a bit of time looking into it,
Now the preview image disapears in admin (it calls a item->thumb and not normal images, just have to find where it is and we have a complete k2 seo image optimization.) If anyone has a tip here, it is welcome.
Markus Amanto said:
One additional thing I noticed in the process. Joomla/K2 replaces some characters in the filename when uploading/saving the image which messed it up a bit for me at first, but in case that happens to you, you can use an ftp program to check the image folder and see what name your files have been given and then just make sure that what you have entered in the "Item image credits" matches that.
For example in my case it replaces my dashes that I first entered in the filename with underscores.