You have to initialize array before using it.. try following code with appropriate changes.
JSONObject json = new JSONObject(result);
JSONArray articles = json.getJSONArray("images");
JSONArray jsnarray=json.getJSONArray("images");
image_first =new String[jsnarray.length()]; //initializtion
image_second =new String[jsnarray.length()];
for(int i=0;i<jsnarray.length();i++){
image_first[i] = (articles.getJSONObject(i).optString("image_first"));
image_second[i] = (articles.getJSONObject(i).optString("image_second"));
}