I have a huge codebase and I'd like to replace all the PNG and JPG file extensions with WebP but the problem is that the codebase also has external image links, that aren't hosted on my server. So I'd only like to change the links for local files.
CodePudding user response:
This regex has worked for me: /"\/[^"] ?[png|jpg]"/
. This what it looks like on