It depends on which mirror or lens you use if you use a concave mirror or a convex lens if you move the object towards the mirror between f and 2f you get a magnified real image if you move beyond f ou will get a magnified virtual image. However you will never be able to get a magnified image if you use a convex mirror or concave lens.