Glide dont load image from document - android-studio

i have external local database and i have to save image into database,
image come from camera and gallery and image drawable
glide load image from imagedrawble but cant load image from camera or gallery
and i save uri these images
glide can load this uri from image drawable
content://media/external/images/media/772718
but cant load this uri from camera or gallery
content://com.android.providers.media.documents/document/image%3A772711
i load image this way
Uri uri = Uri.parse(modelInsertInfo.getImage_src());
Log.d("LOG30",uri.toString());
Glide.with(this).load(uri).into(imgDetail);

You can try obtaining path from your uri object and pass it to Glide, check the code below :
Glide.with(this).load(uri.getPath()).into(imgDetail); // get path from Uri and pass it to glide.

Related

How to check if image is loaded in Express and replace with default local image?

I have collection with image, where the src is external URL.
I want when the image is not found(not working url), to be replace it with local default image?
Is there a way to check if the image is loaded and replace it in middleware? Some equivalent onError event in the browser?
I found front-end solution, in which is added event listener for 'onerror' event to every image and replace its src attribute. I need back-end solution!

How to get AmlDatastore image url from Azure

I'm trying to use auto ML to train an object detection model. I have all of my images uploaded to azure and am trying to create my jsonl file for the tabular dataset. I'm using this document: https://learn.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models
This is their example of an image url: AmlDatastore://image_data/Image_01.png
How do I get that url for my images in my datastore? When I view the image in the datastore, it shows me an https url. I tried using that one but I get an error that the file is not found. I've also tried making an AmlDatastore url with a path to my image with no luck there either.

Firebase storage - resize image extension

i wanted to resize my images, so i installed this resize image extension.
Problem is it only resize image if i upload it on firebase website. Problem is if i upload it through nodejs or flutter, it does not resize..
Do i need to set some metadata or what? Does it only work for firebase website? Or is it possible to somehow trigger extension?
_reference.putData(
await pickedImage.readAsBytes(),
SettableMetadata(contentType: 'image/jpg'),
); ```

How to load image from a url without image extension

The following image url
https://via.placeholder.com/150/771796
Its working in browser, but from picasso and glide i am not able to load the image into my imagview.
You have to resize image in this size load failed.

Image is not loaded in MVC5 JQuery during initial Load requested via IIS

1.When pointing the URL as "http:/servername/virtualdirectory" and for example i am setting image path as ../Content/Images/xx.png using jquery in js file then the images is not loaded
2.When pointing the URL as "http:/servername/virtualdirectory/controllername/action" and for example i am setting image path as ../Content/Images/xx.png using jQuery in js file then the Images is loaded.
Questions is why the image is not loaded during IIS request from routeconfig.cs ie 'http:/servername/virtualdirectory' in MVC5
Try using <img src="~/Content/Images/xx.png"> in your Razor syntax. This will generate a correct path to your image.

Resources