21stdigital / statamic-aida

A.I.D.A is a Statamic addon that automates the generation of image alt texts using AI, enhancing web accessibility and SEO with minimal effort.
MIT License
5 stars 0 forks source link

Any way to get it to NOT create alt text in various languages? #17

Closed isaackearl closed 4 months ago

isaackearl commented 5 months ago

It would be really nice for me if I could configure it as 'en' => 'alt' and leave it at just that. Is there a way for me to disable the auto creation in other locales? Really cool package btw. Thanks!

Sm1lEE commented 5 months ago

Hi @isaackearl,

please try this configuration in your config/aida.php file:

// config/aida.php

<?php

return [

  // ...

  'alt_field_mapping' => [
    'en' => 'alt'
  ],

  // ...

];

?>

(Ensure that the configuration file is published first: php artisan vendor:publish --tag="aida-config")

With this configuration A.I.D.A will only generate alt texts for your en site and save them on the alt field. It will not generate alt texts for any other site/language.

isaackearl commented 4 months ago

awesome that totally worked thanks! Funny part is that I thought I did that yesterday but I must have had a caching issue or something. I went to record a video today so I could show you the bug, and sure enough it just worked as expected. Thanks!