0

We have a Magento 1.7 with many images in CMS blocks, CMS pages and attributes (like description).
Unfortunately, a lot of these images don't have alt or title tags. I want to run a script that would:

  1. Get all Images paths that are stored in the database - search for all <img tags.
  2. Check if they already have an alt or title tag.
  3. If they don't, set the image name as the alt and title tag.
  4. If they have just an alt or a title tag, use that value to populate the missing tag

Additional Info

For some unexplainable reason, some images have an empty alt tag <img src="" alt />

  • I think it is a piece of paid work - to write actual script that will do the job. SO is the place where you can find answers on your problems, but will not do all the job for you. – StasGrin Jul 13 '17 at 21:53
  • Give it a try and write at least some code, dude :) – StasGrin Jul 13 '17 at 21:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.