911 - Help, please. I screwed up with the webp conversion and not sure how to fix it...and it needs to be fixed asap (of course).

6 posts by 4 authors in: Forums > CMS Builder
Last Post: May 31, 2023   (RSS)

By Codee - May 31, 2023 - edited: May 31, 2023

Hi Dave and the I.T. Team,

So, I had successfully  used the webp conversion on nearly 80,000 jpeg photos.  Then while prepping to move the site to a new host I basically overwrote the database unintentionally so the CMSB gallery listings reflects all of these photos as their jpeg versions, in name, but they are actually webp versions physically.  Screenshot below.  IF I go to a browser and try to view any of the images individually in a new browser window they will show if I change the file extension in the browser window to ".webp" instead of ".jpg" like the database thinks they are.

Is there a way to relatively simply correct the filenames?

I was wondering if re-running the webp converter would correct the listings...but, as you already know, it will not. Screenshot of that attached also...CMSB thinks nearly all the photos in the database are jpegs.

What if I run the webp converter on the original site still on the other host - and then just backup CMSB on the original site but then restore that backup to the site on the new host?  Wouldn't CMSB change all those file extensions in the original site's database?

Thanks in advance.

By Toledoh - May 31, 2023

Hey Codee  

i eould use the cmsb backups. you may be lucky and be able to just download the section backup, or if not then the full backup.

open the backup in a text editor, the find and replace .jpg with .webp

save as a new filename, then upload and restore.

Good luck!

Cheers,

Tim (toledoh.com.au)

By Codee - May 31, 2023 - edited: May 31, 2023

Tim,

Thank you for your suggestion ~ just what I was "thinking" but so often that's a dangerous area for me! ;-)  Perfect. *update: It worked. Don't see any errors and the gallery photos are all updated and showing. Phew! That was scary.

Terry

By Codee - May 31, 2023

Thank you, Steve. Makes great sense. I appreciate it.

By zaba - May 31, 2023

Export the specific table, open exported file, search and replace in your editor (.jpg for .webp) save and restore the updated file.