3

I have a gallery on each of my single entry pages, that includes image files uploaded by my users.

Is there a way to automatically change the filenames of these images upon upload? Something like IMG1074.jpg to entry_title_001.jpg?

I'm outputting the images via CE image, and I have tried the filename= parameter, but that renames all the images within the gallery to the same filename.

2
  • Auto renaming files on upload is a bit tricky, but not impossible. We currently are working on a new release of Channel Images, ill try to see if i can sneak that feature in. Feb 13 '13 at 18:30
  • Would love it if you could work that in!
    – shorn
    Feb 13 '13 at 19:21
3

If there's something unique per-image in the Channel Images output (assuming your gallery is just a dump of all images assigned to the field), you should be able to append that unique value to your entry_title, right?

filename="{url_title}_{image:id}"

It's not something I've done, but I'm assuming you can do more with the filename parameter to make those filenames unique.

I think this solution was successfully applied in this question: Renaming image file names.

1
  • You're right. I totally forgot the values of channel images. image:id has worked for the output. Still would be nice to have the originals renamed, but will suffice for now.
    – shorn
    Feb 13 '13 at 19:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.