                 switch(dict.content_type!) {
                 case "image/jpeg", "image/jpg", "image/png", "image/gif", "image/bmp":
                     contenttype += 1
-                    let imageview = NSImageView(frame: NSMakeRect(0, 0, 150, 150))
+                    mmsView.frame = NSMakeRect(0,0,150,150)
+                    let imageview = NSImageView(frame: mmsView.frame)
                     mmsView.addSubview(imageview)
                     imageview.imageScaling = .ScaleProportionallyDown
                     


    //var backgroundView: NSImageView!
    var backgroundView: NSView!
    var mmsView: NSView = NSView(frame: NSMakeRect(0,0,150,150))

    var orientation: Orientation = .Left
    static let font = NSFont.systemFontOfSize(NSFont.systemFontSize())

    }

    class func heightForContainerWidth(msg: Message, width: CGFloat) -> CGFloat {
        let field = NSTextField(frame: NSZeroRect)
        field.attributedStringValue = TextMapper.attributedStringForText(msg.msg!, date: false)
        field.sizeToFit()
        var height = field.frame.height + TimeHeight + TextTopBorder + TextBottomBorder + 20
        
        if msg.sms! == false && msg.messageparts!.count > 0 {
            var contenttype = 0
