May 4, 2011

Remove first image | 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
Remove first image
Topic Rating: 5 Topic Rating: 5 Topic Rating: 5 Topic Rating: 5 Topic Rating: 5 Topic Rating: 5 (2 votes) 
May 8, 2025
2:54 pm
Avatar
keklick1337
Member
Members
Forum Posts: 21
Member Since:
May 8, 2025
sp_UserOfflineSmall Offline

On my website template I display on every blog post thumbnail like a first image. How to configure CyberSEO to didn't add first image into post body? 

May 8, 2025
3:43 pm
Avatar
keklick1337
Member
Members
Forum Posts: 21
Member Since:
May 8, 2025
sp_UserOfflineSmall Offline

need something like a edit post and remove first <p><img></p> after publish and set thumbnail. 
How I can do that? Where I can modify code for that? 

May 8, 2025
3:47 pm
Avatar
CyberSEO
Admin
Forum Posts: 4150
Member Since:
July 2, 2009
sp_UserOfflineSmall Offline
May 8, 2025
4:47 pm
Avatar
keklick1337
Member
Members
Forum Posts: 21
Member Since:
May 8, 2025
sp_UserOfflineSmall Offline

CyberSEO said
This article proposes a solution: https://www.cyberseo.net/blog/why-featured-images-appear-twice-in-cyberseo-posts-and-how-fix-it/  

It is not possible to hide featured image. I have custom theme =(
Maybe it has solution to edit post text after publish? I can write php code to remove first img tag (by regex), but I don't know where.

May 8, 2025
4:56 pm
Avatar
CyberSEO
Admin
Forum Posts: 4150
Member Since:
July 2, 2009
sp_UserOfflineSmall Offline

Yes, the plugin allows you to use custom PHP code to remove the first image tag from posts: https://www.cyberseo.net/content-syndicator/#php-code

The code should modify the $post['post_content'] variable.

May 8, 2025
6:18 pm
Avatar
keklick1337
Member
Members
Forum Posts: 21
Member Since:
May 8, 2025
sp_UserOfflineSmall Offline

CyberSEO said
Yes, the plugin allows you to use custom PHP code to remove the first image tag from posts: https://www.cyberseo.net/content-syndicator/#php-code

The code should modify the $post['post_content'] variable.  

post_content doesn't have <img> tag...

  'post_content' => 'A recently identified malware named LOSTKEYS, which is capable of extracting files and system data.....'

But after posting in post it has 

<p><img class="aligncenter" src="https://website.com/wp-content/uploads/2025/05/russian-cyber-group-unveils-lostkeys-malware-in-recent-attacks-infosecurity-magazine.png" alt="Russian Cyber Group Unveils LOSTKEYS Malware in Recent Attacks - Infosecurity Magazine" /><br />A recently identified malware named LOSTKEYS.....

May 8, 2025
6:28 pm
Avatar
keklick1337
Member
Members
Forum Posts: 21
Member Since:
May 8, 2025
sp_UserOfflineSmall Offline

DALL∙E image position adds image at start of post. 
And after thumbnail generated from first image. 
It is possible to force set DALL E image to thumbnail without adding to post? 

May 8, 2025
6:53 pm
Avatar
CyberSEO
Admin
Forum Posts: 4150
Member Since:
July 2, 2009
sp_UserOfflineSmall Offline

Yes, you can do it this way:

  1. On the Media enhancements tab, in the DALL∙E image position drop-down list, select store in the custom field "thumb".
  2. On the Media handling tab, in the Post thumbnails drop-down list, select Create from the "thumb" custom field.

keklick1337 said

post_content doesn't have <img> tag...

Please specify which RSS feed you are importing and how exactly you configure the image insertion or generation

Forum Timezone: Europe/Amsterdam

Most Users Ever Online: 541

Currently Online:
4 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

ninja321: 86

harboot: 72

s.baryshev.aoasp: 68

Freedom: 61

Pandermos: 54

MediFormatica: 49

Member Stats:

Guest Posters: 337

Members: 3018

Moderators: 0

Admins: 1

Forum Stats:

Groups: 1

Forums: 5

Topics: 1710

Posts: 8814

Newest Members:

contato.cezar.vieira, zarata.stz, kravproton, vipulmediaworks, braibantjulien, kustomer

Administrators: CyberSEO: 4150