{"id":1880,"date":"2021-05-28T01:12:04","date_gmt":"2021-05-27T19:42:04","guid":{"rendered":"https:\/\/imageattributespro.com\/?p=1880"},"modified":"2023-04-25T10:09:02","modified_gmt":"2023-04-25T04:39:02","slug":"custom-filter-and-regex-filter","status":"publish","type":"post","link":"https:\/\/imageattributespro.com\/custom-filter-and-regex-filter\/","title":{"rendered":"Filter Custom Characters With Custom Filter And Regex Filter"},"content":{"rendered":"

Image Attributes Pro already comes with a range of common special characters that you can remove from the image filename to generate image attributes like alt text and image title. <\/p>

Here is a screenshot of the available Filter Settings<\/code> Image Attributes Pro: <\/p>

\"Filter<\/figure>

Right below the available filters you have the Custom Filter<\/code> and in this doc we will see how to use them to generate the attributes that we want. <\/p>

Custom Filter And Regex Filter<\/h2>

The custom filter can be used to filter out any characters or words. Words or characters can be comma separated and are case sensitive. <\/p>

Advanced users can use the regular expression (regex) part of the custom filter to filter out patterns from the image filename before it’s used as an image attribute. <\/p>

Example Usage 1<\/h2>

Let’s say you are a photographer and all your images are named in this format: businessname-words-to-desribe-the-image-sequencenumber-ratio-dimensions-quality.jpg<\/code><\/p>

An example of that would be: abcphotography-lion-walking-towards-sunset-01-16x9-2880x1620px-10pct.jpg<\/code><\/p>

You want to generate the image attribute as: Lion Walking Towards Sunset<\/code><\/p>

Here are the settings to select in the Bulk Updater Settings<\/code> tab.<\/p>