Keyword

Broblem with Image Alt Attributes

  • Stamatis
  • Stamatis's Avatar Topic Author
  • Offline
  • Senior Member
  • Athens Day & Night
More
6 years 1 month ago - 6 years 1 month ago #167215 by Stamatis
Broblem with Image Alt Attributes was created by Stamatis
Hello

I have a problem with k2 image Alt Attributes

in link bellow i see this info:

You have images on your page that are missing ALT attributes.

We found 111 images on your page and 35 of them are missing the attribute.

www.seoptimer.com/athens-dayandnight.gr

I use the k2 Item image caption & credits but the problem is still there.

How i can fix it?
My site is this if you want to test athens-dayandnight.gr

thank you
Last edit: 6 years 1 month ago by Stamatis. Reason: info

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
6 years 1 month ago #167228 by Krikor Boghossian
Replied by Krikor Boghossian on topic Broblem with Image Alt Attributes
Hello,
These are images generated from 3rd party modules not from stock K2 modules (or the component)
jmp.sh/q56pjud

You need to address this issue to the modules' developers.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Stamatis
  • Stamatis's Avatar Topic Author
  • Offline
  • Senior Member
  • Athens Day & Night
More
6 years 1 month ago #167239 by Stamatis
Replied by Stamatis on topic Broblem with Image Alt Attributes
Hello Krikor

thank you very much. I understand the problem. the modules' developers is not exist anymore. So if you have an other solution for new module near them please tell me.

Stamatis

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
6 years 1 month ago #167242 by Krikor Boghossian
Replied by Krikor Boghossian on topic Broblem with Image Alt Attributes
You can look at the way that the K2 Content module is using the alt tags
github.com/getk2/k2/blob/master/modules/mod_k2_content/tmpl/Default/default.php#L74 and try to alter the module's code.

Keep a backup since this might lead to a 500 error and you will have to revert your changes.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Stamatis
  • Stamatis's Avatar Topic Author
  • Offline
  • Senior Member
  • Athens Day & Night
More
6 years 1 month ago #167244 by Stamatis
Replied by Stamatis on topic Broblem with Image Alt Attributes
Thank you krikor

i will try it.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
6 years 1 month ago #167251 by Krikor Boghossian
Replied by Krikor Boghossian on topic Broblem with Image Alt Attributes
You 're welcome Stamati :)

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
6 years 1 month ago #167261 by mahesh
Replied by mahesh on topic Broblem with Image Alt Attributes
I'm also facing the same problem but your solution is not working in my case. Please suggest other option

Please Log in or Create an account to join the conversation.

  • Stamatis
  • Stamatis's Avatar Topic Author
  • Offline
  • Senior Member
  • Athens Day & Night
More
6 years 1 month ago #167272 by Stamatis
Replied by Stamatis on topic Broblem with Image Alt Attributes
Hello, it's true is not working. I think that a new module is the solution. I try some diferent codes but no one work. I have big problem with this image alt.

If you find a solution please tell me.
Thank you

Please Log in or Create an account to join the conversation.

  • Stamatis
  • Stamatis's Avatar Topic Author
  • Offline
  • Senior Member
  • Athens Day & Night
More
6 years 1 month ago #167277 by Stamatis
Replied by Stamatis on topic Broblem with Image Alt Attributes
i find a solution for my module.
k2 module us this code:
<img src="<?php echo $item->image; ?>" alt="<?php echo K2HelperUtilities::cleanHtml($item->title); ?>" />

in my mode the development put in code this [0] and [$i] and just put this in the standar k2 module code.
now work and is like this:

<img src="<?php if( !empty($items[0])){ echo $items[0]->imageMedium;}?>" alt="<?php echo K2HelperUtilities::cleanHtml($items[0]->title); ?>" />

I wish to help you

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
6 years 1 month ago #167287 by Krikor Boghossian
Replied by Krikor Boghossian on topic Broblem with Image Alt Attributes
Nice one Stamati, Kudos for finding a solution.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum