Questions tagged [image-loading]

386 questions
2
votes
0 answers

React - Loading images in conditional rendering - performance issue

I have a React application in which after clicking on the buttons I change the categories and each category has its own layout with text and images. The problem is that I conditionally render this layout using switch/case and every time the content…
2
votes
1 answer

Jetpack Compose Coil Preload

I want to load the image on the spash screen so that I can set the request result to the background on other screens using the coil, but I have not been able to fully realize this in the coil. How can I save the result of my coil request to Cahce…
2
votes
0 answers

Coil in RecyclerView does not load new content on scroll

Help me please. I use Coil to show images in grid RecyclerView. The implementation is very straightforward - in each viewholder.bind() i call image.load(URL). URL is static URL = "https://loremflickr.com/200/200/" and simply provides a new random…
2
votes
3 answers

Please explain this code

Trying to make sense of the code below, as I want to customise it a bit. As per the comments, the callback function is passed the last image to load as an argument. Can someone please explain how the callback is passed only to the last image (I…
user747970
2
votes
1 answer

Content in ngOnInit or ngAfterViewInit should not load until alll images in tags are loaded

I'm using Angular 8 for a blog based web-app. Data is stored in json file for now, even images to be loaded along with the path. JSON data [ { "imgSrc": "./assets/images/dalai-hills-1.jpg", "destination": "Dalai Hills", …
2
votes
1 answer

(Py)Qt: problem with image downloading

guys I want to display some images with their captions in QTextEdit. I have a dictionary with captions and corresponding URLs. The problem is when I post a request with QNetworkAccessManager and wait for a signal finished(QNetworkReply*), I get…
nikagra
  • 835
  • 2
  • 9
  • 23
2
votes
0 answers

Giving CORS issue while using ionic-image-loader plugin on Android device and Browser

I had used ionic image loader plugin, Link: https://www.npmjs.com/package/ionic-image-loader When I try to load an image using "img-loader" as below It gives CORS issue for…
nishil bhave
  • 582
  • 1
  • 5
  • 17
2
votes
1 answer

How to reduce memory usage of image in Android

I have a screen where I have to show two similar images on screen . The size of both these images is dynamic but they covers most of the screen. When I navigate to this screen in my app, I see a spike of 12MB in Memory Monitor in AndroidStudio…
Harry
  • 1,151
  • 11
  • 27
2
votes
1 answer

Glide: load specified region of image

I am loading image from server using Glide with this code: private void loadImage(Context context, String url, ImageView imageView, int x1, int y1, int x2, int y2) { Glide.with(context) .load(url) .into(imageView); } I need to…
BArtWell
  • 4,176
  • 10
  • 63
  • 106
2
votes
1 answer

How do I get alerted in Javascript that an image's dimensions are available?

I need to be able to wait to start a function until the height and width of an image are available. When this code calls start(), it still says the height and width are zero: var img = new Image(); init = function() { img.onload =…
cstack
  • 2,152
  • 6
  • 28
  • 47
2
votes
1 answer

local image take a long time to load when uri image are downloading - React Native

When I created my application, the images I placed worked perfectly and loaded normally. Later, connect to the server and there are images that I have to display through url. As a large list, there are many images that must be downloaded causing all…
jose920405
  • 7,982
  • 6
  • 45
  • 71
2
votes
1 answer

Java Image Loading from .jar File

I'm trying to load an image from a folder named Custom that the user places images into. Here is the method I used to load images: public BufferedImage getCustImg(String path){ BufferedImage img = null; String s = get.getProgramPath(); …
Josh
  • 257
  • 1
  • 13
2
votes
0 answers

Picasso failing to load image from FilePath

I am trying to load the image I get from Gallery app. Then I get the URI from the data.getData().getPath(). I get the path which looks like this: file:///-1/1/content%3A/media/external/file/10393/ORIGINAL/NONE/453874796 What kind of path is this?…
user2498079
  • 2,872
  • 8
  • 32
  • 60
2
votes
6 answers

Load browser images with javascript event?

I've got a page containing a lot of images, which are initially hidden from view as I'm using tabbed divs (ie. hiding some divs using CSS display:none). Therefore, when then page loads, it takes ages to load all of the images, which looks like the…
Curtis
  • 101,612
  • 66
  • 270
  • 352
2
votes
0 answers

How can I background preload image in RecyclerView Android onBinding?

Loading images to recyclerview is very slow and allways load from online. private void setBackground(String imageUrl, ImageView background, boolean croped) { Picasso.with(contexts).setIndicatorsEnabled(false); if (croped) …