How can I modify the filename suffixes of uploaded files in WordPress?

耗尽温柔 提交于 2019-12-13 00:30:04

问题


I was wondering if it is possible to modify the way WordPress handles image uploads. If I upload an image now, the default filenames for the various sizes include the dimensions, something like the following: image-100x100.jpg, image-300x300.jpg, image-600x600.jpg, and image.jpg.

While this may be useful in some cases, I need these file names to be a bit more versatile, something like the following: image-thumb.jpg, image-medium.jpg, image-large.jpg, and image.jpg.

Does anyone have any ideas how I could accomplish this? Thank you for reading. As always, any ideas or suggestions are appreciated.


回答1:


You may be able to use Wordpress' native post images, for which you can define resize dimensions using add_image_size. I think this is a 3.0+ feature.



来源:https://stackoverflow.com/questions/9447940/how-can-i-modify-the-filename-suffixes-of-uploaded-files-in-wordpress

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!