adding keep aspect to core/ajax/preview.php