 
             if (imagePath?.contains("http"))! {
                 imageView.sd_setImage(with: URL(string: imagePath!), placeholderImage: UIImage(named: "no_preview.png"))
+            } else {
+                var path = self.getDocumentDirPath()
+                if (imagePath?.contains(path)) ?? false {
+                    path = imagePath!
+                } else {
+                    path = path.appendingFormat("/%@", imagePath!)
+                }
+                let tempImage = UIImage(contentsOfFile: path)
+                imageView.image = tempImage
             }
-                else {
-                    var path = self.getDocumentDirPath()
-                    path = path.appendingFormat("/%@", imagePath!)
-                    let tempImage = UIImage(contentsOfFile: path)
-                    imageView.image = tempImage
-            }
-
             imageView.contentMode = UIViewContentMode.scaleAspectFit
             imageView.clipsToBounds = true
-
             self.popupScrollView.addSubview(imageView)
         }
     }
 
+    // MARK: - Get Document Dir Path
     func getDocumentDirPath() -> String {
         let documentsPath = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)[0]
         return documentsPath

        return instance
    }()

    func initWithFrame(frame: CGRect, parentView: UIView) -> ImageSliderSwift {

        self.parentView = parentView


        self.hideView()
    }

    // MARK: - Set Center View Margin Color
    func setMarginColor(marginColor: UIColor) {
        self.centeredView.backgroundColor = marginColor
    }
