Search code examples
androidfirebase-storagepicasso

Unable to load a remote Image captured using Phone Camera using Firebase Storage


Capturing Of the Image using Phone Camera is possible by Using photoIntent then Uploading the Captured Image is Successful and i can observe the image captured in the Firebase storage but i cannot load the image from Firebase storage and i only view the placeholder but the images posted from gallery are loaded to the Image View and are visible. What could be the issue what photoIntent and i am using Picasso library to render this Images from Firebase Storage? Any help would be appreciated The attached method receives the image url from Firebase realtime Database and is supposed to load the image in the image view

` private void assignDetails(String d_name, String d_phone, String d_image, String d_email, String d_location, String d_price, String d_capacity) {
    tv_name.setText(d_name);
    tv_phone.setText(d_phone);
    tv_email.setText(d_email);
    tv_location.setText(d_location);
    tv_price.setText(d_price);
    tv_capacity.setText(d_capacity);

    Picasso.with(getApplicationContext).load(d_image)
            .placeholder(R.drawable.back_image)
            .fit()
            .centerCrop()
            .into(detail_image);
}`

Solution

    • Kudos finally rendering is working, The issue is not with the Firebase storage but with Picasso library .
    • Solution : Update Picasso Library to the latest Version :
    • Note: there is a bug with the previous version of Picasso (picasso:2.5.2) that prevents large images (i.e. 10MB) from being loaded, especially with newer camera phones that have larger resolutions. If you are experiencing this issue, you may need to upgrade to the latest Picasso version (picasso:2.71828) at the time of writing this response . For latest version check https://github.com/square/picasso