May 4, 2011

Uploading and attaching images to posts | CyberSEO Pro | Support Forum

Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_TopicIcon
Uploading and attaching images to posts
Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 (0 votes) 
November 2, 2023
10:08 am
Avatar
woebegone
Member
Guests
Forum Posts: 15
Member Since:
October 10, 2023
sp_UserOfflineSmall Offline

I have a post item in my JSON like this.

{
"id": "n0XwI6wh7",
"Thumbnail": "https://framerusercontent.com/images/zQbBkJjXTLZxlViRRswV3tuXFE.jpg",
"Title": "Nominal",
"Categories": "Personal, Portfolio, Photography, Agency",
"Content": "Test Content",
"Slideshow 1": "https://framerusercontent.com/images/KQXAoOiF2XPGEoX4x37cIQt49c0.jpg",
"Slideshow 2": "https://framerusercontent.com/images/BXsiSUVWpoh29MDBInbSlqNfY.jpg",
"Slideshow 3": "https://framerusercontent.com/images/HF3PbTziDnLvBdZbJSbdkn3BC0.jpg",
}
 
In custom fields section, I added below code to successfully assign thumbnail to the post.
 
Thumbnail->thumb
 
But with a small bump. If I enable "Add to the Media Library" option. Thumbnail is duplicated in Media Library.
 
My actual question is, I want to upload and attach "Slideshow 1", "Slideshow 2" and "Slideshow 3" to the post. What is the best and simple way to do that?
 
I created custom image upload fields with ACF Pro. Is it possible to upload those images to those fields?
 
 
November 2, 2023
11:30 am
Avatar
CyberSEO
Admin
Forum Posts: 3945
Member Since:
July 2, 2009
sp_UserOfflineSmall Offline

With this setting, the thumbnail of the post will always be added to the library.

As for your second question. Just explain exactly how you want these images to be imported? If you want to store them as some custom fields, you should use the same method as with the thumbnail. If you want to insert them somehow into the body of the post, you need to define their HTML layout in the "Post content" template box. For example:

Login to see the code

Or somehow else, depending on your needs. Here is a good manual for that: Login to see this link

November 2, 2023
12:29 pm
Avatar
woebegone
Member
Guests
Forum Posts: 15
Member Since:
October 10, 2023
sp_UserOfflineSmall Offline

I want to add those images to the media library attached to the post. I don't want them in the content BCS I'll code custom template renderer after. I want to reach those images from the custom fields. I added "slideshow_1->slideshow_1" to the Custom Fields section like I did for thumbnail but still the images is not added uploaded to the media gallery nor to the custom image field. This screeshot below form the edit screen of the post.

uploaded image

 

And this one is represent the settings of the custom filed.

uploaded image

 

And as a dip note, if I enable "Republish existing posts" the previous thumbnail is not delete from the media library and the new duplicate added. Is there a way to prevent it?

November 2, 2023
1:12 pm
Avatar
CyberSEO
Admin
Forum Posts: 3945
Member Since:
July 2, 2009
sp_UserOfflineSmall Offline

Looks like you need to see your JSON feed. The same goes for the "Republish existing posts" feed. Just export that feed with your settings to a file, and send it to Login to see this link.

November 2, 2023
1:56 pm
Avatar
woebegone
Member
Guests
Forum Posts: 15
Member Since:
October 10, 2023
sp_UserOfflineSmall Offline

Sent!

November 2, 2023
2:13 pm
Avatar
CyberSEO
Admin
Forum Posts: 3945
Member Since:
July 2, 2009
sp_UserOfflineSmall Offline

The media library duplication problem when "Republish existing posts" is enabled has been fixed. Be sure to update your plugin on CyberSEO Pro's General Settings page.

As for your JSON feed. The link to the feed on your site is invalid (file doesn't exist), as well as the attached one is not well formatted - it's just a part of the actual feed, not a whole file, so I can't check it.

November 3, 2023
10:22 am
Avatar
woebegone
Member
Guests
Forum Posts: 15
Member Since:
October 10, 2023
sp_UserOfflineSmall Offline

Hello. Thank you. The duplication problem solved like you said. It works like a charm, good job. The URL is valid but you can't reach because it's my localhost in MAMP server like below.

uploaded image

I must say the thumbnail is still duplicated with the settings below:

uploaded image

 

I think there is not a way to add images to custom images fields, right? Maybe I should add those images to the content and hide them in front-end?

November 3, 2023
10:30 am
Avatar
CyberSEO
Admin
Forum Posts: 3945
Member Since:
July 2, 2009
sp_UserOfflineSmall Offline

The thumbnails are not duplicated. Please read Login to see this link. There was an issue with removing media library images when republishing posts and it has been fixed. Now, these "duplicates" are just different sized thumbnail images that WordPress generates for your theme according to its layout requirements. Such as medium, thumbnail, large and maybe square, landscape, portrait, etc.

As about adding them to custom fields. You can easily do it as described Login to see this link. Just set your "Custom fields" rule as follows:

Login to see the code

Be sure to use the exact XML tag name as it appears in the Preview Mode (XML Structure) box. Also use the exact name of the custom field you want to store the image URL in.

November 3, 2023
10:56 am
Avatar
woebegone
Member
Guests
Forum Posts: 15
Member Since:
October 10, 2023
sp_UserOfflineSmall Offline

Here are the duplicates of the thumbnails.

Like you said it scaled, but both has same URL: //reframer.net/wp-content/uploads/2023/11/nominal-19-150x150.jpg

But I can live with it. The important one was the actual images, and they are not duplicated anymore.

uploaded image

I already added the necessary rules to my custom fields, but the image custom field is different from the normal string field, and they are not accepting image URLs. Normally they are updated like below: 

update_field('key_1234567890123', $attachment_id, $post_id);

But I don't know the attachment_id and post_id and where to add this.

November 3, 2023
11:03 am
Avatar
CyberSEO
Admin
Forum Posts: 3945
Member Since:
July 2, 2009
sp_UserOfflineSmall Offline
10sp_Permalink sp_Print
0

Maybe you have not updated the plugin core. I cannot reproduce your issue here. Export your feed settings to a file and send it to the same email address. But make sure that the actual JSON link is accessible there. The settings you sent me earlier point to a non-existent URL, so I was unable to check your settings.

Regarding your second question. The plugin does not support adding images as attachment IDs (not as their URLs) to custom fields. Could you please share your vision on how this feature should be implemented via CyberSEO Pro's user interface (the feed settings panel)?

November 3, 2023
12:22 pm
Avatar
woebegone
Member
Guests
Forum Posts: 15
Member Since:
October 10, 2023
sp_UserOfflineSmall Offline
11sp_Permalink sp_Print
0

My plugin version is "10.115" Is it correct?

When I disable "Add to the Media Library", The thumbnail is not duplicated. But content images are not added to the image library that way.

As a suggestion, I would change the label of "Republish existing posts" to "Update existing posts" because drafts remains as draft even after update anymore.

Let me think about the implementation of the feature. If a good idea came up to my mind, I'll happily share it.

November 3, 2023
12:27 pm
Avatar
CyberSEO
Admin
Forum Posts: 3945
Member Since:
July 2, 2009
sp_UserOfflineSmall Offline
12sp_Permalink sp_Print
0

Yes, your version is 10.115 and the fix was made within that version (after its initial release), so if you don't update the plugin core manually, you'll have to wait 24 hours for it to be updated automatically.

The plugin republishes the posts, not updates their content. The old post is deleted and a new post is created with a new ID and a new posting date to push it up on your index page. The status of the post remains the same, as requested by a CyberSEO Pro user here: Login to see this link

November 3, 2023
2:51 pm
Avatar
woebegone
Member
Guests
Forum Posts: 15
Member Since:
October 10, 2023
sp_UserOfflineSmall Offline
13sp_Permalink sp_Print
0

Thank you for your responsiveness.

Forum Timezone: Europe/Amsterdam

Most Users Ever Online: 541

Currently Online:
8 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

ninja321: 84

s.baryshev.aoasp: 68

Freedom: 61

Pandermos: 54

MediFormatica: 49

B8europe: 48

Member Stats:

Guest Posters: 337

Members: 2852

Moderators: 0

Admins: 1

Forum Stats:

Groups: 1

Forums: 5

Topics: 1639

Posts: 8349

Newest Members:

torontomark48, info.ckmedianetwork, contact.mybeautystar, samuelbodde, john.prush, creightonnick0

Administrators: CyberSEO: 3945