A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
search
AI OnAI Off
Hi, I seem to be having issues returning the alt text for an image stored in EPiServer.
I'm storing an image in the cms in an ImageVaultImage control and inputting the desired alt text at this point.
However, this alt text doesn't seem to be returned when I try to read the IVFileData in:
public static string GetImageAltText(string imageURL)
{
string altText = "";
try
{
IVFileData fileData = IVDataFactory.GetFile(IVUrlBuilder.ParseUrl(imageURL).Id);
altText = fileData.AltText;
}
catch (Exception)
{
}
return altText;
}
Am I approaching this all wrong?