News:

Support the VirtueMart project and become a member

Main Menu

product images name - problem

Started by marvays, January 23, 2017, 20:06:55 PM

Previous topic - Next topic

marvays

hi. where i set change name of uploaded images? my client upload any images with czech langueg and Vm save with name "Zářivka 3000K.jpg" and save to ftp "/images/stories/virtuemart/product/resized/Zářivka 3000K.jpg_350x350.jpg" :(
VM cant change name to "zarivka-300k.jpg?
thx

PS: VM 3.0.18, J! 3.6.5

jjk

...\administrator\components\com_virtuemart\helpers\image.php
Aproximately line 112 there is the following line:
$this->file_name_thumb = $this->file_name.'_'.$width.'x'.$height;

I've changed that to:
$this->file_name_thumb = $this->file_name.'-tn';
in order to be able to upload and use thumbnail names like filename-tn-jpg. The thumbnail path has to be adjusted in the image settings after synchronizing uploaded images in order to see the thumbnails in the VM backend.

The disadvantage of this solution is that you have to re-apply this change after every VM update.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

marvays

This modification of code ensures that when the upload accents will be removed from the title picture?

jjk

Quote from: marvays on January 23, 2017, 22:06:49 PM
This modification of code ensures that when the upload accents will be removed from the title picture?
No, sorry I misunderstood your question. I thought you want to get rid of ...350x350.jpg

I don't know which code has to be changed to eliminate the accents from the filename. If I remember correctly VM2 did, but there were 'feature requests' from other users to keep the accents, which was implemented some time ago.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations