Skip Navigation

[Resolved] Displaying alt text with [wpv-post-featured-image] with a custom size

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 7 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 3 replies, has 2 voices.

Last updated by Shane 7 years, 5 months ago.

Assisted by: Shane.

Author
Posts
#533778
West Granton featured image custom image size.png
West Granton featured image thumbnail size.png

I was trying to insert post data in a View with a featured image. The featured image size was set to a custom size of 100 x 100 px.

This was my shortcode:

[wpv-post-featured-image size="custom" width="100" height="100" crop="true"]

I found that the rendered image didn't show the alt attribute for the image.

If I used one of the default image sizes instead and just used the [wpv-post-featured-image] shortcode it worked as expected.

The workaround has been to add a new image size to functions.php and select the image size from the dropdown list of featured image sizes.

Screenshots attached.

Can you explain why the original shortcode didn't work as expected?

#533928

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Chris,

Thank you for contacting our support forum.

So the issue you are having currently is the this shortcode here :
[wpv-post-featured-image] Displays ALT text
[wpv-post-featured-image size="custom" width="100" height="100" crop="true"] This does not?

Correct?
Please let me know.
Thanks,
Shane

#534181

Hi Shane

Yes, that's correct. If a custom size parameter is set in the [wpv-post-featured-image] shortcode the ALT text does not show in the html. All other pre-defined sizes set in the shortcode output the ALT text properly, eg [wpv-post-featured-image size="medium"] outputs the ALT text.

Thanks,
Chris

#534474

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Chris,

I took a look at this in a clean install of wordpress, however I was not able to experience this issue as the ALT text shows up for both variations of the shortcode.

Could you try temporarily disabling all your non-toolset plugins and checking to see if the alt text shows up ? As this could be because of a plugin conflict.

Thanks,
Shane

The forum ‘Types Community Support’ is closed to new topics and replies.