I´m using Snapshot theme from WooThemes.
The code which resizes (width and height and size in kb), and shows the images (an 'a' tag, wrapping an 'img' tag) is this one:
<?php if ( get_option('woo_resize') ) { woo_get_image('image','210','280');?>
The problem is:
I´ve setted the 'alt' text while posting and, when trying to see the post image source code, the 'alt' attribute, appears, empty.
Does anyone has passed for this before?
Any tips?
The post which I wanted to have the 'alt' attribute is the first product in the first row, in the first column:
http://kevingstongramado.p.ht/catalogo/?cat=28
I´ve tried to insert code manually, without the use of the theme´s functions..
Here´s what I´ve tried:
EDIT (I´ve noticed posting one new post, that the code doesn´t resize in kb):
<?php $img_attr = wp_get_attachment_image_src($attachment->ID, 'image');
$image = wp_get_image_editor($img_attr[0] ); // Return an implementation that
//extends <tt>WP_Image_Editor</tt>
if ( ! is_wp_error( $image ) ) {
$image->resize(210, 280, true );
$image->save($img_attr[0]);
}
$alt = get_post_meta($attachment->ID, '_wp_attachment_image_alt', true);
?>
<a href="<?php echo get_permalink($post->ID); ?>" title="View <?php the_title(); ?>">
<img src="<?php echo get_post_meta($post->ID, "image", $single = true); ?>" alt="<?php
echo $alt;?>"/></a>
The code doesn´t resize in kb and, still don´t get the 'alt' attribute.
I´ve tried using 'SEO Friendly Images' plugin. Doesn´t work for me.
What should I do?