how can i show the image not the url, thnak you - image

the file uploaded is an image, but it shows a url. how can i show the image. Thank you.
Moreover, how to hide the field in case the users haven't input.

Related

How to save the image URL at the exact position where the image was included in React-Quill (MERN stack)?

I am building an application, on the front end there is there are a few fields, including a rich text editor (react-quill) that can take in an image. I have saved the values from the first page and displayed them back to the user for confirmation. In order to do so I used local storage in the form of formData as shown below
formData = {"questionTitle": "Here is a test field",
"questDesc": "<p>Here is the Image <img src=\"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcU.. />” }
My problem is after confirmation, I am trying to push the formData to MongoDB but I need to save the image (in cloudinary) separately from the database. How do I send the image to Cloudinary and instead save the URL in the MongoDB at the exact position that was inserted in react-quill?
I want to know if there is a better solution to my problem. Currently, the image is in base64 in local storage, is there a way to just refer to the route of the image while in local storage, and push it to the cloudinary after confirming? All pointers, and suggestions welcome!!

Drupal 7 image_style_url not creating the styled image

I have the following codes to test the image_style_url() on the latest drupal(v7.59)
<img src=“<?= file_create_url($fileuri); ?>” />
<img src=“<?= image_style_url(“medium”, $fileuri); ?>” />
The file_create_url() can show the original image properly, and the image_style_url() can only give the styled image url, but not creating any styled image in the styled image folder.
the public:// and the /tmp directriea are in 777 permission setting, so it won’t be related to permission problem.
Can someone tell me what is wrong with my drupal?
Seems you have to create the image derivate first. Normally this happens automatically when uploading an image via an image field upload. But the automatic derivate creating might simply get skipped on file field uploads, or when using some other image which isn't managed by Drupal at all, or when you added an image style after you already uploaded the image.
Have a look at image_style_create_derivative($style, $source, $destination). Check out the comments as well as $style needs to be an array returned by image_style_load('MYSTYLE').
Creates a new image derivative based on an image style.
Only issue left open is how to check first if the derivate already exists before calling that function. Maybe you can check what file_exists(image_style_path($style_name, $file_uri)) returns, first.
Read more: https://drupal.stackexchange.com/a/22555/15055
Nothing wrong with your Drupal. Derivative image is not physically created until someone visits the listing where that style is used.
Example: You create new node and upload an image on it. Original image is within files folder. But if you use for example teaser image style and if you go to teaser folder the image is not created there until someone visits the page where "teaser" image style is used. You can easily test this on clean Drupal. Basically the image is created on the fly on HTTP request.

Fetch image from server and render it in

I want to fetch image from the server, save it locally and and display when user opens the show page - with Rubymotion.
I am using AFMotion to fetch the image url as follows.
In my show screen I can get the image url with news.image_url. My doubt is how do i pass this to the layout file where I can add some styles to it like
I have found a solution to my own question. This is what i have done.
In the on_load method of the show news page, I pass the image url and set the remote_image for the UIImageView to the image url passed.
I got the solution from the red potion documentation. http://docs.redpotion.org/en/latest/cookbook/networking/

In Reporting services, how do I add an image from a string or cell in the table?

What I'm trying to do is this: I have a string with the full path to the image. I tried to add an external image to my report and set the image source to my string. but every time I load the report, it doesn't load the image. How do I do this, or is there a better way of doing this?
Thank you
For an External image, the image source needs to be a URL for the image. Reporting Services will try to get the image using anonymous access.
http://technet.microsoft.com/en-us/library/dd220527.aspx
Ok, I got it figured out. What I did was in the image properties, in the General Tab, I selected the image source as External, I then created a report parameter Called "#ImageURL", and selected it in the "Use this image:".
On the form I added this line of code:
ReportViewer1.LocalReport.SetParameters(New Parameter("ImageURL", string.concat("file:\","C:\ImagesFolder\ImageName.jpg")))
this brings up the image correctly.

How to post a dynamic image to wordpress post?

I want to put a image into a post, but it seems I just cannot get it work.
For example, this one:
http://stockcharts.com/c-sc/sc?s=ACHN&p=D&b=5&g=0&i=t88400486500&r=9913
The output is a PNG file. So in HTML tab, i put,
< img src="http://stockcharts.com/c-sc/sc?s=ACHN&p=D&b=5&g=0&i=t88400486500&r=9913">,(I leave a empty space between the < and image otherwise, stackoverflow won't allow me to put a image tag here) it just won't show up the correct image. The image you will see is "go to stockcharts.com to view this chart", that is because the URL is wrong. If the URL is correct, the image will display fine. Any way to work around?
I was trying to play around with the formatting.php file, but so far, no luck.
(It is quite strange though, if you put the URL into your IE URL bar, and press enter, it shows up fine with a chart.)
Thanks.
Your URL is a web page, NOT an image. When you try to insert the link as an image, the html IMG tag is used to specify the FILE NAME to be inserted. The file can be on a different url but it should not refer to just another uri.
to get around it, you have 4 options:
Specify the image file name directly and not the uri with the img tag.
Use iframe and put the uri
use frame (I'd not go for this)
Use Ajax and fill it in a DIV tag - most effective in my opinion.

Resources