RegEx - How To Insert String Before File Extension
- by st4ck0v3rfl0w
Hi All,
How would I insert "_thumb" into files that are being dyanmically generated.
For example, I have a site that allows users to upload an image. The script takes the image, optimizes it and saves to file. How would I make it insert the string "_thumb" for the optimized image?
I'm currently saving 1 version of the otpimized file.
ch-1268312613-photo.jpg
I want to save the original as the above string, but want to append, "_thumb" like the following string
ch-1268312613-photo_thumb.jpg