I have an old project that I'm currently working on updating to a new version of Svelte, and have loaded up my old svelte-filepond component that all appears to work fine, apart from previewing recent images.
If I load up an old image to edit, it will preview the image fine... if I load up a new image to edit, it will not preview the image at all.
Both the old image and the new image comes from an AWS S3 Storage, Both Images load fine and have full access to get/put/update/delete. Both images require server={} configuration to preload into filepond using filepond's load: as follows.
load: (source, load) => {
const myRequest = new Request(source);
fetch(myRequest).then(response => {
response.blob()
.then(myBlob => {
load(myBlob)}
);
});
},
I have console logged out every single part of my filepond system from the moment the files enter the component until the filepond component is live and displaying the filename, filesize.
I end up with a perfect blob in both filepond components at the end, but one is displaying an image, and the other one is not. The only difference between the two images is that one is old, uploaded last year, and the other is new, uploaded recently.
Old Image
New Image
Does anyone know What could possible cause this kind of situation?
Related
I have problems with show newly uploaded images in vue3 project with vite4 on production after build. I try every code I found on net but still no success. I try to show user profile image that is store in src/assets but if I have image in build is show, if upload new its not show. Here is my code how I take the image
const profileImg = new URL(
`../assets/images/avatars/${currentUser.avatar}`,
import.meta.url
).href;
After upload I get this in 'profileImage' "site-host/undefined"
I try to get images like is in documentation for vite 4 for dynamic images with this code
function getImageUrl(name) {
return new URL(`./dir/${name}.png`, import.meta.url).href
}
But not working. Please any help
I'm somehow new in Laravel App development. I'm working on a project and everything is working fine, but in a section I need to display images like a gallery collections of images and I'm accessing images from a hosted server with a stored image link in Database table.
There is a problem in displaying images some of the images are displaying and some of them are not displaying when I'm refreshing the page this time some other images are not displaying and some of them do. I think there may be problem on how I'm accessing images from database or may be client side scripting languages.
Images are not completely loaded from server and the image field displays only a not found image icon instead of image. With each refresh of page (re loading the page) some new images are finding the same problem and some of previous images which are not displayed before this time displaying properly . I wonder why this happens? please somebody help me.
Note: Project hosted in a production server.
This is the rout value of images when I'm accessing them.
Route::get('productimage/{file_name}', function($filename){ $path =
storage_path('app').'/productimage/'.$filename; $image =
File::get($path); $mime = File::mimeType($path); return
Response::make($image, 200)->header('Content-Type', $mime); });
this is how I'm accessing images in views
<img src="{{asset('productimage/'.$row->image)}}" class="img-class"/>
this is a screen shoot from images in view
this is a screen shoot of images after page refreshed
Ok so I'm trying to load images from external resources.
My web api returns a json to my Nativescript app.
In my Nativescript code, I parse a json retrieved from my api, to construct the view manually. Everything works fine but the image part.
For the image, I proceed this way:
var image = new imageModule.Image()
image.src = page.bindingContext.news.getItem(args.index).image_original_link
then I attach it to my layout, through addChild.
I also tried to do it through an XML template, and I have the same problem:
<Image src="https://www.google.com/images/errors/logo_sm_2.png" stretch="none" />
this --^ is never rendered.
If I replace the url by an image located in my local directory:
image.src = "~/images/foo.png"
Then it works perfectly.
I tried to replace the dynamic source url fetched from my array by a static link to an image and it's not getting accessed (I checked the log on the webserver serving said image).
What am I doing wrong?
edit:
I'm testing on iOS
I already have the following in my plist:
NSAppTransportSecurity
NSAllowsArbitraryLoads
Actually on iOS you need to set the height/width of the image control; try doing something like:
<Image src="https://www.google.com/images/errors/logo_sm_2.png" stretch="none" width="100" height="100"/>
In addition if you are using v2.30 of NativeScript there is a bug if you set any parents "color" it can propagate down to the image and cause the image to not show. To fix either remove the "color" from all parents or upgrade to the 2.4 (when released or #next until released)
I have an issue with latest tinyMCE editor, whenever I try to select and edit the image, it's source is converting into blob path like this.
blob:http://localhost/87d42e34-9961-412c-914b-dc6a77ab68e0
Did anyone of you face this issue or resolved... ?
Please help
When you edit images using the TinyMCE Image Tools you will get one of these encoded images - that is how the Image Tools work.
What you can then do is configure TinyMCE to upload this image and you can store that image as you see fit for your application.
The basic process is that TinyMCE will create a separate HTTP POST for each image that you modify with the image editor. It will send that image to a URL of your choosing (via HTTP POST) based on the setting of the images_upload_url option in your init.
The image handler at the URL referenced in the images_upload_url (which you have to create) has to do whatever needs to be done to "store" the image in your application. That could mean something like:
Store the item in a folder on your web server
Store the item in a database
Store the item in an asset management system
...regardless of where you choose to store the image your image handler needs to return a single line of JSON telling TinyMCE the new location of the image. As referenced in the TinyMCE documentation this might look like:
{ location : '/uploaded/image/path/image.png' }
TinyMCE will then update the image's src attribute to the value you return. If you use the images_upload_base_path setting in the init that will be prepended to the returned location. The TinyMCE page has more details on all of this:
https://www.tinymce.com/docs/advanced/handle-async-image-uploads/
The net here is that the Image tools will create one of these encoded images whenever you edit an image. TinyMCE knows when an embedded image exists in your content but it can't possibly know what to do with that image in the context of your application so that job (the "image handler") is something you must create.
I am developing a website where user will select images from their computer and a preview of images will be shown to them before any data is sent to server. I used File API for this and I am storing base64 data of images in an javascript array for sending to server. However, if I upload very big images say of size 15MB then after reading 4 images sometimes the next image isn't getting loaded. The debugger shows "script 14: not enough storage available to complete this operation". But this is working fine on other browsers. I am pulling my hair over this for a week now. Is their any restriction on the storage IE allocates to each website?
check how you create image object.
I had the same issue when i create the image using
var image = new Image()
this fail in IE for large image.
Found the this link change the code as below. and image upload work for larger image.
here is the trick
var img = document.createElement("img");
img.src = window.URL.createObjectURL(file);