I used picasso and get HTTP 504 error this is how I used picasso
Photo photo = photos.get(position);
holder.userName.setText(photo.getId());
String imageUri = photo.getPhotoURL().getThumb();
Picasso.get().setLoggingEnabled(true);
Picasso.get()
.load(imageUri)
.resize(200,200)
.into(holder.photo, new Callback() {
@Override
public void onSuccess() {
Log.d("error-log", "onSuccess");
}
@Override
public void onError(Exception e) {
Log.d("error-log", e.getMessage());
}
});
this is my logcat
2021-11-30 16:19:02.436 5896-5896/com.example.wallpaperapp D/Picasso: Main created
[R0] Request{https://images.unsplash.com/photo-1633113089631-6456cccaadad?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwyNzc5MDJ8MXwxfGFsbHwxfHx8fHx8Mnx8MTYzODI3NjU0Mg&ixlib=rb-1.2.1&q=80&w=200 resize(200,200)}
2021-11-30 16:19:02.440 5896-5930/com.example.wallpaperapp D/Picasso: Dispatcher enqueued [R0]+4ms
2021-11-30 16:19:02.441 5896-5932/com.example.wallpaperapp D/Picasso: Hunter executing [R0]+5ms
2021-11-30 16:19:02.442 5896-5896/com.example.wallpaperapp D/Picasso: Main created [R1] Request{https://images.unsplash.com/photo-1638274457917-d86ec719bed8?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwyNzc5MDJ8MHwxfGFsbHwyfHx8fHx8Mnx8MTYzODI3NjU0Mg&ixlib=rb-1.2.1&q=80&w=200 resize(200,200)}
2021-11-30 16:19:02.443 5896-5930/com.example.wallpaperapp D/Picasso: Dispatcher enqueued [R1]+0ms
2021-11-30 16:19:02.446 5896-5933/com.example.wallpaperapp D/Picasso: Hunter executing [R1]+3ms
I add Internet permission I also used Glide but I got the same result I check the solutions but could not solve the issue I used thumb because I searched and understand Its because of big image maybe , but again not loading image I checked out this and does not help