Sorry I know that this is an old question, but I've been looking for a solution to the same question, and come up with this rather horrible solution:
global $wpdb;
$getimage = get('fieldname',$group,1,1,$post->ID); // Magic Fields 'get' syntax
$query = "SELECT ID FROM wp_posts WHERE guid='".$getimage."'";
$results = $wpdb->get_results($query);
$attachment = $results[0];
$image = wp_get_attachment_image_src($attachment->ID,'image-size');
$imageurl = $image[0];
I needed to get the image URL rather than output an img
tag so I could use it as a background image. Replace 'image-size'
on line 6 with whatever image size you have defined.
Hope this helps!
Edit: I've condensed into a function:
In functions.php
// Add image size - as per WP
add_image_size('image-size',50,50,true);
// Get WP image size from Magic Field
function mftoimgsize($fieldname, $group, $postID, $imagesize) {
global $wpdb;
$getimage = get($fieldname,$group,1,1,$postID);
$query = 'SELECT ID FROM '.$wpdb->base_prefix.'posts WHERE guid="'.$getimage.'"';
$results = $wpdb->get_results($query);
$attachment = $results[0];
$image = wp_get_attachment_image_src($attachment->ID,$imagesize);
$imageurl = $image[0];
return $imageurl;
}
In template:
<?php echo mftoimgsize('mf-field-name', $group , $post->ID, 'image-size'); ?>