MySql change part of the field or column

If you have a table with column that contains eg file names with extension and want to replace the extension of all those file names.

Eg we have a table named menu with column icon. The icon column contains image file names with extension .png eg dress.png , shoes.png and we want to replace only .png by .svg leaving the filename (without extension) intact. we can use the following command in SQL:

UPDATE menus SET icon = replace(icon, RIGHT(icon, 3), ‘svg’)
WHERE id > 0 AND icon <> ”;