4
votes

I am working on wordpress(3.5.2) project but getting one issue in case of image resizing. In wordpress when i upload any image its auto resizing to thumbnail,medium and larger but the name of image taking like image-300x300.jpg but i want, for thumbnail it should be imagename-thmbnail.jpg, for medium imagename-medium.jpg and for large imagename-large.jpg

I have made changes in Setting/Media - image re-size but it not coming consistence image name .

I do appreciate for advance help.

1
Googling wordpress thumbnail file name gives me this: doc4design.com/articles/wordpress-better-naming-of-thumbnailsPekka
I have gone through above link but not getting below code in media.php line no 358 if ( !$suffix ) $suffix = "{$dst_w}x{$dst_h}";Neil
The line or its location may have changed since 2009. Can you see anything similar in that file?Pekka

1 Answers

1
votes

If I follow you correctly Neil, You are wanting the image files created in the WordPress upload/sizing routine to be named as follows: [imgname]-thmbnail.jpg, [imgname]-medium.jpg, [imgname]-large.jpg.

To the best of my knowledge this is not an option. If you can provide more detail on why you want to do this I may be able to help more.

You can declare custom image sizes in your functions.php file like so:

`add_image_size( 'thmbnail', 80, 80, true );`

and then use it in your theme:

`the_post_thumbnail('thmbnail');`.

Just be aware WordPress uses the following natively: thumb, thumbnail, medium, large, post-thumbnail.