Skip to content

Commit

Permalink
Merge pull request #113 from side777/dev
Browse files Browse the repository at this point in the history
Keep full size image names from having first letter stripped (#112)
  • Loading branch information
tevko committed May 26, 2015
2 parents aa517f7 + 60c2627 commit 976db41
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion wp-tevko-responsive-images.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,11 @@ function tevkori_get_srcset_array( $id, $size = 'thumbnail' ) {
$img_sizes['full'] = array(
'width' => $img_meta['width'],
'height' => $img_meta['height'],
'file' => substr( $img_meta['file'], strrpos( $img_meta['file'], '/' ) + 1 )
'file' => $img_meta['file']
);
if ( strrpos( $img_meta['file'], '/' ) !== false ) {
$img_sizes['full']['file'] = substr( $img_meta['file'], strrpos( $img_meta['file'], '/' ) + 1 );
}

// Get the image base url.
$img_base_url = substr( $img_url, 0, strrpos( $img_url, '/' ) + 1 );
Expand Down

0 comments on commit 976db41

Please sign in to comment.