Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+5 votes
275 views
in Plugins by
edited by

Every image uploaded via the Sceditor editor will have an alt text as "Image". This is not SEO-friendly.

The chance that someone finds your site through Google Image Search is maybe zero.

The chance that the image is included beside text content on Google normal search result pages is maybe also low.

The tip here is to use the file name as alt text. For example, your filename is alibaba-and-forty-milfs.jpg, then the alt text will be "alibaba-and-forty-milfs". Still better than the boring "Image".

$alttext = pathinfo($filename, PATHINFO_FILENAME);

Or a better trick :

$alttext = str_replace("-", " ",pathinfo($filename, PATHINFO_FILENAME));

And down under,

echo '<img src="'.$url.'" alt="'.$alttext.'" /> ';

Please log in or register to answer this question.

...