When I upload images wordpress saves four files onto the server (as defined in settings->media):
1 -> thumbnailsize (150x150)
2 -> Medium size (1024x768)
3 -> Large size (1920x1080)
4 -> Original size (---x---)
I always need the large size image, but when I upload an image with a size of 1620×1080 , WordPress will name the image some-image-1620×1080.jpg what I don’t want.
Can I change in any way the imagename from some-image-1920×1080.jpg to some-image-large.jpg?
You’ll have to create a function in your
functions.php
file, which will handle the file upload and will be hooked at filterwp_handle_upload_prefilter
:Read the documentation here.
I still haven’t found a particular solution for this problem, and a few people claim that you cannot change the name of the uploaded files, only add something to it. What I’ve used now is Gallery Theme plugin by Maxon in order to get my thumbnail and large-images in two seperate data-paths, what fixed my entire problem. The plugin is massively lightweight and does the job perfectly for galleries.
The plugin can be found here:
http://wordpress.org/plugins/gallery-theme/