Insert images inside the post
Quote from yolandal on September 23, 2017, 2:27 pmI tried the last code and that works, but also as Radone, I don’t want my audience to see all of my media. I only need the option ‘Insert Image’. Can the button ‘Add Media’ be removed from the code / or change the code?
I tried the last code and that works, but also as Radone, I don’t want my audience to see all of my media. I only need the option ‘Insert Image’. Can the button ‘Add Media’ be removed from the code / or change the code?
Quote from Ron Rollo on January 24, 2018, 6:19 pmHi Thomas, I have a couple questions regarding adding photos to a post.
So far I have inserted over 3,000 photos directly into the posts of the forum. This option works very well but I have noticed that the more photos I add, the slower the forum loads up. Some of my members are saying that it is so slow that it times out. I am 99% sure this is due to the amount of photos (data) being stored directly within the post/forum. Short term I am reducing the size of the photos and removing as many as possible to try to relieve the lag.
I started looking into using a third party photo hosting like Image Shack. I was with Photobucket several months ago but now they want to charge $400 a year. This is one of the reasons why we have made major changes to our forums.
Question #1: Is it possible to add a third party link (like from Image Shack) into the body of the post? I read that you are not a fan of third party photo hosting. Neither am I, but the amount of photos required in our forum is necessary and is becoming an issue. We may have to resort to third party hosting if possible.
Question #2: When I click on the photo box in the tool bar to insert a photo into the post, the dialog box background is white. If you recall, my website background is dark gray and my text is white. So the text in the dialog box is not seen due to this conflict although I know it is there. Is there a way to change the color of the dialog box background?
Question #3: Do you know how many photos or how many gigs of information we can post into our post / forum before it becomes a problem? At this point, I can manage the data in the forum but as members post more photos, I am worried that at some point we will hit a wall.
Thank you for all your support, the forum is fantastic!
Regards,
Ron
Hi Thomas, I have a couple questions regarding adding photos to a post.
So far I have inserted over 3,000 photos directly into the posts of the forum. This option works very well but I have noticed that the more photos I add, the slower the forum loads up. Some of my members are saying that it is so slow that it times out. I am 99% sure this is due to the amount of photos (data) being stored directly within the post/forum. Short term I am reducing the size of the photos and removing as many as possible to try to relieve the lag.
I started looking into using a third party photo hosting like Image Shack. I was with Photobucket several months ago but now they want to charge $400 a year. This is one of the reasons why we have made major changes to our forums.
Question #1: Is it possible to add a third party link (like from Image Shack) into the body of the post? I read that you are not a fan of third party photo hosting. Neither am I, but the amount of photos required in our forum is necessary and is becoming an issue. We may have to resort to third party hosting if possible.
Question #2: When I click on the photo box in the tool bar to insert a photo into the post, the dialog box background is white. If you recall, my website background is dark gray and my text is white. So the text in the dialog box is not seen due to this conflict although I know it is there. Is there a way to change the color of the dialog box background?
Question #3: Do you know how many photos or how many gigs of information we can post into our post / forum before it becomes a problem? At this point, I can manage the data in the forum but as members post more photos, I am worried that at some point we will hit a wall.
Thank you for all your support, the forum is fantastic!
Regards,
Ron
Quote from Asgaros on January 24, 2018, 7:19 pmHello Ron!
So far I have inserted over 3,000 photos directly into the posts of the forum.
I hope you did not directly copy&paste a photo from your harddrive into the editor because in this case basically the image-file gets converted into a giant byte-string and saved as raw-text into the database which is converted back into an image when a user opens it. This could be indeed the reason for those performance-issues.
Is it possible to add a third party link (like from Image Shack) into the body of the post?
Yes. In the editor-toolbar there should already be an “Insert/edit image”-button which allows you to directly include an image via an URL. Just copy this URL into the source-field and after a click on “OK” it should appear right inside your post.
So the text in the dialog box is not seen due to this conflict although I know it is there. Is there a way to change the color of the dialog box background?
This seems to be a theme-related issues because some CSS-rules of it overwrite its appearance (I think not on purpose). You can leave me a link so I could have a short look. Maybe a simple CSS-rule can fix this problem.
Do you know how many photos or how many gigs of information we can post into our post / forum before it becomes a problem?
As long as you include it via the upload-function or the editor-button described above, there should be no problem at all. Because in those both cases its just included via a simple html-image-tag and directly loaded from the harddrive of your (linked) webserver and not written into your database.
Greetings,
Thomas
Hello Ron!
So far I have inserted over 3,000 photos directly into the posts of the forum.
I hope you did not directly copy&paste a photo from your harddrive into the editor because in this case basically the image-file gets converted into a giant byte-string and saved as raw-text into the database which is converted back into an image when a user opens it. This could be indeed the reason for those performance-issues.
Is it possible to add a third party link (like from Image Shack) into the body of the post?
Yes. In the editor-toolbar there should already be an “Insert/edit image”-button which allows you to directly include an image via an URL. Just copy this URL into the source-field and after a click on “OK” it should appear right inside your post.
So the text in the dialog box is not seen due to this conflict although I know it is there. Is there a way to change the color of the dialog box background?
This seems to be a theme-related issues because some CSS-rules of it overwrite its appearance (I think not on purpose). You can leave me a link so I could have a short look. Maybe a simple CSS-rule can fix this problem.
Do you know how many photos or how many gigs of information we can post into our post / forum before it becomes a problem?
As long as you include it via the upload-function or the editor-button described above, there should be no problem at all. Because in those both cases its just included via a simple html-image-tag and directly loaded from the harddrive of your (linked) webserver and not written into your database.
Greetings,
Thomas
Quote from sven321 on January 25, 2018, 12:31 pmHi Ron…
I take this WP plugin, it has not been regenerated for 2 years, but it works 100% under wp 4.9.2 to 5.x.:
Advanced Image Styles
Hi Ron…
I take this WP plugin, it has not been regenerated for 2 years, but it works 100% under wp 4.9.2 to 5.x.:
Advanced Image Styles
Quote from sven321 on January 25, 2018, 12:43 pmHi all…
With the media link worked well, works, but I am irritated that I can not customize the button CSS, ONLY as a text link Iich think not so good. Where is the CSS path for the “button”?
function add_my_media_button(){ echo '<a href="'.get_site_url().'/wp-admin/media-new.php" class="button button-default">Insert image</a>'; }******* class=”button button-default” *******
Hi all…
With the media link worked well, works, but I am irritated that I can not customize the button CSS, ONLY as a text link Iich think not so good. Where is the CSS path for the “button”?
function add_my_media_button(){ echo '<a href="'.get_site_url().'/wp-admin/media-new.php" class="button button-default">Insert image</a>'; }
******* class=”button button-default” *******
Quote from Yworld on January 25, 2018, 2:12 pmQuestion #1: Is it possible to add a third party link (like from Image Shack) into the body of the post? I read that you are not a fan of third party photo hosting. Neither am I, but the amount of photos required in our forum is necessary and is becoming an issue. We may have to resort to third party hosting if possible.
Question #1: Is it possible to add a third party link (like from Image Shack) into the body of the post? I read that you are not a fan of third party photo hosting. Neither am I, but the amount of photos required in our forum is necessary and is becoming an issue. We may have to resort to third party hosting if possible.
Quote from Ron Rollo on January 25, 2018, 2:29 pmThank you for the information!
Yes, most of the photos are copied and pasted directly into the post. I was about 75% complete before I realized that this is not going to be a long term solution. More work ahead it looks like.
Here is a link to our forum:
http://hangar45.net/hangar-45-forum
I noticed I can not copy and paste a screenshot/photo into this post. A setting in this forum prevents this correct?
I have included a screenshot of the dialog box. If I type in it, I can not see the white characters in the white dialog box. Hopefully there is a fix for this so I can move forward with the correct way to post photos.
Is it normal practice to upload the photo to WP and then insert the link in this dialog box? If so, this is a solution for me as an administrator but how would a member go about posting photos without using a third party photo hosting site? Would they use the “Upload Files” button and pull the link from there?
Sorry for the questions but just looking to make sure we are on the right path.
Thanks for the help!
Ron
Thank you for the information!
Yes, most of the photos are copied and pasted directly into the post. I was about 75% complete before I realized that this is not going to be a long term solution. More work ahead it looks like.
Here is a link to our forum:
http://hangar45.net/hangar-45-forum
I noticed I can not copy and paste a screenshot/photo into this post. A setting in this forum prevents this correct?
I have included a screenshot of the dialog box. If I type in it, I can not see the white characters in the white dialog box. Hopefully there is a fix for this so I can move forward with the correct way to post photos.
Is it normal practice to upload the photo to WP and then insert the link in this dialog box? If so, this is a solution for me as an administrator but how would a member go about posting photos without using a third party photo hosting site? Would they use the “Upload Files” button and pull the link from there?
Sorry for the questions but just looking to make sure we are on the right path.
Thanks for the help!
Ron
Uploaded files:Quote from Asgaros on January 25, 2018, 7:05 pmI noticed I can not copy and paste a screenshot/photo into this post. A setting in this forum prevents this correct?
I dont added any setting for this in this forum so I wonder why it is working for you. But basically it should not be possible at all because of the before described problems.
Is it normal practice to upload the photo to WP and then insert the link in this dialog box? If so, this is a solution for me as an administrator but how would a member go about posting photos without using a third party photo hosting site? Would they use the “Upload Files” button and pull the link from there?
At the moment this is the way to go. The reason for this is: I only want to upload the files inside a new post when I can ensure that the post is created. Otherwise people could start to upload files on your server without ever creating the post. This would lead to hidden files somewhere on the server and the need for a clean-up script which has to run on a regular basis. But even this would be not a nice solution, because you can never be sure that people will upload some illegal stuff. You see, its a big problem. I hope, that I can find a better implementation one day.
For your editor-color-problem: Try to add the following code to your themes style.css-file:
.mce-widget, .mce-textbox { color: black !important; }
I noticed I can not copy and paste a screenshot/photo into this post. A setting in this forum prevents this correct?
I dont added any setting for this in this forum so I wonder why it is working for you. But basically it should not be possible at all because of the before described problems.
Is it normal practice to upload the photo to WP and then insert the link in this dialog box? If so, this is a solution for me as an administrator but how would a member go about posting photos without using a third party photo hosting site? Would they use the “Upload Files” button and pull the link from there?
At the moment this is the way to go. The reason for this is: I only want to upload the files inside a new post when I can ensure that the post is created. Otherwise people could start to upload files on your server without ever creating the post. This would lead to hidden files somewhere on the server and the need for a clean-up script which has to run on a regular basis. But even this would be not a nice solution, because you can never be sure that people will upload some illegal stuff. You see, its a big problem. I hope, that I can find a better implementation one day.
For your editor-color-problem: Try to add the following code to your themes style.css-file:
.mce-widget, .mce-textbox { color: black !important; }
Quote from Ron Rollo on January 26, 2018, 2:09 pmHi Thomas,
First off, the code works great. I can now see the text in the dialog box. FIXED!
After getting painted into a corner with Photobucket, I am trying everything I can to stay away from third party photo hosting sites. I never want to get caught like that again.
As you can see, I “somehow” was able to simply copy and paste a photo into my post. The image link in the post looks like this: blob:http://hangar45.net/c0adec66-1437-42db-8b25-e4404916f592
So then I took that same image and uploaded it to my WP media library which creates a link. I can take that link and using the photo button in your forum, I can post the photo.
That link looks like this: (http://hangar45.net/wp-content/uploads/2018/01/Shanes-CDU1.png)
NOTE: If I don’t throw ( ) around the link the photo pops up like it did below.
Storing the photos in my WP media Library rather than in the forum post should significantly speed up the load time to instantaneous rather than 15 second (for me). Other members are reporting a minute or more.
So I may have found a solution and solved the problem. (with your help and text color fix)
Members can post photos using the dialog box and links back to their third party photo hosting site.
And I can use my own media library to store the files and link back to them.
Last question: Does anyone know if there is a cap (limit) on the amount of data that our WP Media libraries can hold? And if so, is there a way to increase the size if needed?
Thanks for all your help! The forum is top notch!
Ron
Hi Thomas,
First off, the code works great. I can now see the text in the dialog box. FIXED!
After getting painted into a corner with Photobucket, I am trying everything I can to stay away from third party photo hosting sites. I never want to get caught like that again.
As you can see, I “somehow” was able to simply copy and paste a photo into my post. The image link in the post looks like this: blob:http://hangar45.net/c0adec66-1437-42db-8b25-e4404916f592
So then I took that same image and uploaded it to my WP media library which creates a link. I can take that link and using the photo button in your forum, I can post the photo.
That link looks like this: (http://hangar45.net/wp-content/uploads/2018/01/Shanes-CDU1.png)
NOTE: If I don’t throw ( ) around the link the photo pops up like it did below.
Storing the photos in my WP media Library rather than in the forum post should significantly speed up the load time to instantaneous rather than 15 second (for me). Other members are reporting a minute or more.
So I may have found a solution and solved the problem. (with your help and text color fix)
Members can post photos using the dialog box and links back to their third party photo hosting site.
And I can use my own media library to store the files and link back to them.
Last question: Does anyone know if there is a cap (limit) on the amount of data that our WP Media libraries can hold? And if so, is there a way to increase the size if needed?
Thanks for all your help! The forum is top notch!
Ron
Quote from Yworld on January 26, 2018, 2:16 pmLast question: Does anyone know if there is a cap (limit) on the amount of data that our WP Media libraries can hold? And if so, is there a way to increase the size if needed?
Your hosting only can limit the number of files in the folder. Ask them a question
Last question: Does anyone know if there is a cap (limit) on the amount of data that our WP Media libraries can hold? And if so, is there a way to increase the size if needed?
Your hosting only can limit the number of files in the folder. Ask them a question