**You can convert your bitmap to byte array and save it in realm database.**
like this :
Bitmap bmp = intent.getExtras().get("data");
ByteArrayOutputStream stream = new ByteArrayOutputStream();
bmp.compress(Bitmap.CompressFormat.PNG, 100, stream);
byte[] byteArray = stream.toByteArray();
Notice:Realm supports the following field types: boolean, byte, short, ìnt, long, float, double, String, Date and byte[]
**You can use [this][1] for realm configuration in android too.**
[1]: https://realm.io/docs/java/latest/
And you can convert **imageview** to **bitmap** by :
imageView.buildDrawingCache();
Bitmap bmap = imageView.getDrawingCache();
Please Read carefully
Firstly convert image into ByteArray
i am giving demo
Bitmap bmp = intent.getExtras().get("data");
ByteArrayOutputStream stream = new ByteArrayOutputStream();
bmp.compress(Bitmap.CompressFormat.PNG, 100, stream);
byte[] byteArray = stream.toByteArray();
and then save byte[] into Realm database
Notice: Strings and byte arrays (byte[]) cannot be larger than 16 MB
Realm supports the following field types: boolean, byte, short, ìnt, long, float, double, String, Date and byte[]. The integer types byte, short, int, and long are all mapped to the same type (long actually) within Realm. Moreover, subclasses of RealmObject and RealmList are supported to model relationships.