Forum

Thread tagged as: Question

Manually replace files in resource folder?

Hello

A client of mine has a site with well over 1000 images in the resources folder and would like to reduce the file size of them all and re-upload them. I have downloaded them all for him and he is going through the process of reducing the file quality to reduce file size.

All these images are page header images. If I bulk upload the new image files and over-write the ones on the webserver, will this be ok or do they have to go in to each page and add them one by one?

I have looked in the DB table for the resources and it seems to just have the filename of the resource, so I'm thinking it might be ok but I don't want to just go ahead and do it..

Thanks!

Michael Wilkinson

Michael Wilkinson 6 points

  • 7 years ago

Michael, So long as you don't change the filenames or sizes (pixels) then there would be no difference as far as perch goes. If you make size or filename size changes then it's best to re-upload (insert sigh here)

RK

May I recommend using an app like ImageOptim on the Mac to do this image reduction for you on the fly – might save a load of time. Just set the prefs to what you want outputted, drag the image folder in and away you go.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, it should be fine.

Michael Wilkinson

Michael Wilkinson 6 points
Registered Developer

Thanks for the replies guys. The images are exactly the same resolution pixel wise, they have just been re-saved on a lower quality setting.

There is a 'resourceFileSize' column in the resources table which could cause an issue maybe. I guess I could try just doing one and see what happens to it.

Robert - Is this something you have done before?

Michael Wilkinson

Michael Wilkinson 6 points
Registered Developer

Ah, thanks Drew. Sorry, your reply arrived as I was typing mine..

Thank you to you all.

Michael Wilkinson said:

Robert - Is this something you have done before?

Sorry, no I haven't. My guess is the resourcefilesize is updated at upload, and more of an informative note. You may just end up with incorrect file size when viewing assets in assets app. I don't think it will mess anything up.