U
U
Umu2017-09-28 15:37:12
Automation
Umu, 2017-09-28 15:37:12

How to automatically add alt to images in WP?

Greetings! Help solve the problem.
The situation is as follows: the page contains about 100 photos. For all of them, you need to write alt according to several patterns. It's impossible to do it by hand. There are about 500 such pages and 12k photos in total.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Timofeev, 2017-09-28
@webinar

The solution of the problem depends on a bunch of initial ones that you did not give. If you ignore everything, then you probably need to write a script, take batches of records from the database, write in them a string generated by some algorithm, but I don’t know what you have there, let’s say by the title of the linked page.

A
Anastasia Krupin, 2017-10-02
@Freya1990

We have about 45,000 products on the site, where we ourselves upload a photo into a text field - we prescribe there ourselves. But when loading into special. image field - no function to prescribe or set automatically alt. I also recently wanted to do it automatically using a template, but having studied a bunch of material, hanging out on the forums, I came to the conclusion that if you can’t do it manually, then it’s better not to do it. The template can be perceived as spam, empty alts do not do much harm, and in order to optimize the images, you need to make an effort to get the result.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question