- Posts: 49
COMMUNITY FORUM
Broblem with Image Alt Attributes
- Stamatis
-
Topic Author
- Offline
- Senior Member
Less
More
7 years 1 month ago - 7 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
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: 7 years 1 month ago by Stamatis. Reason: info
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
7 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.
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.
Please Log in or Create an account to join the conversation.
- Stamatis
-
Topic Author
- Offline
- Senior Member
Less
More
- Posts: 49
7 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
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
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
7 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.
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.
Please Log in or Create an account to join the conversation.
- Stamatis
-
Topic Author
- Offline
- Senior Member
Less
More
- Posts: 49
7 years 1 month ago #167244
by Stamatis
Replied by Stamatis on topic Broblem with Image Alt Attributes
Thank you krikor
i will try it.
i will try it.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
7 years 1 month ago #167251
by Krikor Boghossian
Replied by Krikor Boghossian on topic Broblem with Image Alt Attributes
You 're welcome Stamati :)
Please Log in or Create an account to join the conversation.
- mahesh
-
- Offline
- New Member
7 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
-
Topic Author
- Offline
- Senior Member
Less
More
- Posts: 49
7 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
If you find a solution please tell me.
Thank you
Please Log in or Create an account to join the conversation.
- Stamatis
-
Topic Author
- Offline
- Senior Member
Less
More
- Posts: 49
7 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
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
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
7 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.
Please Log in or Create an account to join the conversation.