Latest posts

Browse topics

From Uplistsikhe to Chiatura: Exploring Georgia’s Soviet Ghosts and Sacred Pillars

Another awesome weekend is in the books.

This time we picked up Latvian pilgrim Helmuts Noviks and headed west from Tbilisi toward one of the strangest and most fascinating regions in Georgia - Chiatura. But before reaching the rusty cable cars and fading Soviet facades, we made a stop at one of the country’s oldest settlements - the ancient cave town of Uplistsikhe.

Georgia never disappoints when it comes to mixing completely different timelines into a single road trip. One moment you are walking through caves carved into rock thousands of years ago, the next you are drinking Soviet-style lemonade for 1 GEL in a mining town hanging between the past and the future.

That’s exactly why I love traveling here.

First Stop: Uplistsikhe

Located near Gori, Uplistsikhe is one of the oldest urban settlements in Georgia. The place dates back to the early Iron Age and once served as an important political, religious, and trade center.

Even after years of traveling around Georgia, places like this still impress me. Entire halls, tunnels, storage rooms, and passages carved directly into the rock. Walking through the caves, it’s hard not to think about how many civilizations passed through here long before modern Europe even existed.

Renee once again impressed us with her historical knowledge, especially while talking about Queen Tamar and Georgia’s golden age. Road trips become much more interesting when someone in the car actually remembers historical details better than random Google snippets.

The weather was perfect for exploring, and Uplistsikhe looked especially dramatic under the changing spring light.

Heading West

From there we continued deeper into western Georgia.

One of the best things about driving across Georgia is how quickly everything changes. Eastern Georgia’s dry landscapes slowly turn greener, mountains become steeper, and towns start carrying heavier traces of the Soviet industrial era.

The closer we got to Chiatura, the stranger the scenery became.

  • Massive cliffs.
  • Rusting factories.
  • Cable cars crossing above the valley.
  • Old apartment blocks stacked on hillsides.
  • The whole region feels cinematic.

Chiatura — Between Soviet Past and Slow Revival

Chiatura is probably one of the most surreal towns in Georgia, but what surprised me the most during this trip was how much the place has actually improved.

The last time I visited Chiatura was about 10 years ago, and back then it still felt much more like a forgotten Soviet mining outpost stuck somewhere in the past. Crumbling buildings, aging infrastructure, rusty cable cars everywhere, and very little sign of renovation or investment.

Today, the town still carries that heavy Soviet atmosphere - and honestly, that’s part of its charm - but it no longer feels completely frozen in time.

Of course, Chiatura is not modern in the Western European sense. You still see old apartment blocks, industrial scars, and visible economic struggle. But the town center has changed significantly. Especially during summer, Chiatura can actually feel surprisingly lively and even a bit European.

Renovated parks, cleaner streets, outdoor cafes, new public spaces, and people enjoying warm evenings outside completely changed my impression of the city.

There’s now a fascinating contrast between old Soviet infrastructure and gradual modernization without losing the town’s identity.

And yes — somehow lemonade still costs just 1 lari.

That alone deserves respect in today’s inflationary world.

What I like most about Chiatura is that it still feels authentic. It hasn’t been overly polished for tourists. You can still sense the mining history, the Soviet legacy, and the raw atmosphere that made the place famous in the first place — but now combined with a much more pleasant and welcoming environment than I remembered from my previous visit a decade ago.

Honestly, visiting in summer is highly recommended. The surrounding cliffs turn green, the weather is pleasant, and the entire town becomes a surprisingly lovely place to spend a day exploring.

Katskhi Pillar — One of Georgia’s Most Unreal Places

From Chiatura we continued toward Katskhi Pillar.

A massive limestone monolith rising roughly 40 meters above the ground, with a tiny church sitting on top of it. For centuries the pillar symbolized isolation, faith, and ascetic life. Today only monks are allowed to climb to the top.

Standing below it, you start wondering how people even managed to build anything there in the first place.

Georgia has many beautiful monasteries, but Katskhi Pillar is something completely different. It looks more like a fantasy movie location than a real place.

Definitely one of the most impressive landmarks in the country.

Back Through Zestaponi

As evening approached, we headed back east through Zestaponi.

Long road trips in Georgia always feel shorter than they actually are. Maybe because every region changes so quickly — landscapes, architecture, people, even the atmosphere.

Before returning home, we dropped Helmuts off at his current home away from home — Kiketi Farm.

Not a bad place for a Latvian pilgrim to disappear into Georgian countryside life for a while.

Final Thoughts

What I enjoy most about weekends like this is that Georgia constantly feels unpredictable.

  • Ancient cave cities.
  • Soviet mining towns.
  • Sacred pillars balancing on rocks.
  • Cheap lemonade.

And long philosophical conversations somewhere between mountain roads and abandoned factories.

Hard to beat that combination.

Enjoy the video and don’t forget to leave a thumbs up.

Week 62 / How I Managed an NVDA Credit Spread and Added Dividend Stocks

Greetings from Dublin!

Over the past week, I traveled to Dublin, Ireland, where I combined family time, sightseeing, and a bit of investing research.

While exploring downtown Dublin with my daughter, I made a few spontaneous additions to our long-term stock portfolio after visiting familiar businesses such as McDonald's and Papa John's. These purchases were not based on deep financial analysis but rather on an investing habit I've been developing over the years: occasionally turning everyday experiences into opportunities to become a small owner instead of just a customer.

It was a fascinating week in Ireland. While my future wife attended one of the largest localization industry conferences for networking and professional development, my daughter and I spent our time exploring Dublin and discovering new places. I also took the opportunity to learn a little more about the Irish stock market and local investing culture.

Outside of Dublin, one of the highlights of the trip was renting a car at Dublin Airport and driving along Ireland's Wild Atlantic Way. We stayed in Galway and Doolin, visited the spectacular Cliffs of Moher, and enjoyed some excellent seafood chowder along the coast.

Back to the portfolio.

As of June 12, 2026, the portfolio value increased by 0.99% compared to the previous week, reaching $12,664.

This week I took a proactive approach to managing my NVIDIA position. With NVDA trading around the $200 level, I felt there was an increased possibility of further downside, so I rolled the existing bull put credit spread one week forward while lowering the strike prices.

The new position was established at the 192.5/170 strikes. In the process, I widened the spread, increasing the maximum theoretical risk but also creating considerably more room for the trade to succeed. The adjustment generated additional premium while moving the short strike farther away from the current market price.

Widening a spread is not something I do routinely, but under the circumstances it seemed like a reasonable adjustment. As always, the objective is not to maximize premium but to improve the probability of success while keeping overall portfolio risk at an acceptable level.

Current Options Positions

  • NVDA Jun 18, 2026 192.5/170 Bull Put Credit Spread
  • 2x BMY Jun 18, 2026 50/46 Bull Put Credit Spread
  • DBK FRA Jun 19, 2026 24/20 Bull Put Credit Spread (EUR)
  • NFLX Aug 21, 2026 76 Cash-Secured Put
  • LHA FRA Sep 18, 2026 7.6 Cash-Secured Put (EUR)
  • ARCC Sep 18, 2026 16 Cash-Secured Put
  • NVDA Jun 17, 2027 $125 Covered Call

Most of the short-term premium still comes from NVDA credit spreads. Longer-dated positions such as NFLX, LHA and ARCC currently function more like income-producing cash-secured puts than weekly trading positions.

Reinvesting Premium

Using premium collected this week, I added:

  • 0.1 shares of NVDA
  • 0.1 shares of McDonald's (MCD)
  • 0.5 shares of Papa John's (PZZA)

Both MCD and PZZA were spontaneous additions inspired by our travels around Ireland.

Interestingly, all three recent purchases are dividend-paying stocks. Together with NVIDIA's recently increased dividend, projected annual dividend income has now grown to approximately $181.50.

That certainly won't fund an early retirement, but it is becoming meaningful. It's enough to pay for a night in a decent hotel somewhere along Ireland's Wild Atlantic Way.

More importantly, it demonstrates how small, consistent investments can gradually compound into a growing stream of passive income over many years.

Weekly Options Income and Margin Update

This week generated $51 in options premium.

That's below my long-term goal of generating around $100 per week, but I'd rather grow the portfolio steadily than take unnecessary risks. Blowing up an account is easy; building one takes time.

I don't expect to consistently generate more than $100 per week under current market conditions without materially increasing portfolio risk. For now, patience seems like the better approach.

Margin Debt

Margin usage increased slightly this week because of the additional purchases of McDonald's and Papa John's shares. For the moment, I'm comfortable with that.

The current margin balance stands at approximately -$2,980. At a constant pace of $51 in weekly premium, it would theoretically take about 58 weeks to eliminate the remaining margin debt.

Of course, that is only a rough estimate. Premium income fluctuates from week to week, dividend payments occasionally contribute, and market conditions constantly change.

My goal remains reducing the margin balance to zero sometime during 2027 while continuing to grow the portfolio without taking excessive risk.

Lessons From This Week

  • Risk management remains more important than maximizing premium.
  • Rolling challenged positions can buy additional time and improve probabilities.
  • Small but consistent stock purchases gradually increase dividend income and diversification.
  • Generating reliable options income requires patience and realistic expectations.

Looking Ahead

The primary position to monitor next week remains the NVDA 192.5/170 Bull Put Credit Spread.

If the trade comes under pressure, the plan remains unchanged: roll forward whenever appropriate, preferably for additional credit, while continuing to prioritize long-term portfolio stability over maximizing short-term premium.

Final Thoughts

This week served as another reminder that portfolio growth doesn't always come from collecting the largest possible option premiums.

Often, the best long-term results come from disciplined trade management, consistent reinvestment of option income, and gradually accumulating quality businesses over many years.

Premium income may have been below average this week, but the portfolio continued moving in the right direction through new investments, growing dividend income, and careful risk management.

Disclaimer: This article reflects my personal investing journey and is provided for informational purposes only. It should not be considered investment advice.

From Pizza Dinner to Portfolio: Why I Bought PZZA Stock in Dublin

Some investment ideas start with a spreadsheet. Others begin while waiting for pizza.

During a recent trip to Dublin, I took my daughter for dinner at Papa John's. While waiting for the pizza, I did what I often do when visiting a familiar consumer business: I checked whether the company was publicly traded.

It turns out that Papa John's International trades under the ticker symbol PZZA.

After a quick look at the stock price, dividend history, and options chain, I decided to buy 0.5 shares for the long-term portfolio.

This was not a major investment decision, nor was it a recommendation. It was simply another small example of how everyday businesses can sometimes become investment ideas.

Why I Look at Businesses We Actually Use

One theme I have been thinking about more recently is the connection between consumption and ownership.

When we visit a company as customers, we usually think about the product, the price, and the overall experience.

Investors see an additional layer:

  • Who owns the business?
  • Is it profitable?
  • Does it pay dividends?
  • Is the stock optionable?
  • Could it fit into a long-term portfolio?

I have used a similar approach with McDonald's, occasionally buying small amounts of MCD stock after family visits.

The point is not that every restaurant visit should become an investment. Rather, everyday life can sometimes produce useful observations about companies, brands, and consumer behavior.

What I Learned About Papa John's

Before this dinner, I had never seriously considered Papa John's as an investment.

I knew the brand and had seen its restaurants, but I had not looked closely at the company from an investor's perspective.

A quick review showed that Papa John's International is publicly traded under the ticker PZZA. The company operates in the global pizza delivery and restaurant market.

I also noticed that the company pays a dividend.

That immediately made the stock more interesting to me as a possible small, long-term portfolio addition.

Why I Bought Only 0.5 Shares

I bought 0.5 shares of PZZA.

The position is intentionally small because I do not yet know enough about the company to justify a larger allocation.

I had not reviewed its recent earnings in detail, compared it thoroughly with Domino's or other restaurant operators, or studied its debt, margins, valuation, and franchise economics.

For me, that distinction matters.

Buying a small fractional position is not the same as making a high-conviction investment. It is closer to placing the company on a personal watchlist while becoming a small owner.

Having even a small financial interest can make it easier to follow earnings, business developments, and long-term performance more closely.

Why I Did Not Sell Options on PZZA

PZZA is an optionable stock, with monthly contracts available.

In theory, an investor could sell cash-secured puts, write covered calls, or structure credit spreads.

However, I decided not to sell options on the stock. At least not yet.

The reason is simple: I do not understand the company well enough.

Just because a stock has an options chain does not mean it automatically belongs in an options income portfolio.

This is a mistake many options traders make. They find a ticker, see an attractive premium, and immediately begin building a trade without first understanding the underlying business or defining an adjustment plan.

I try to avoid that approach.

For options trading, especially in smaller accounts, I prefer companies where I understand the business, the stock's typical price behavior, the risks, and what I would do if the trade moved against me.

That is one reason I continue returning to more familiar positions such as NVDA and NFLX.

Ownership Before Options

With Papa John's, I decided that ownership should come before options.

A small stock position allows me to follow the company more closely without forcing an options trade.

Over time, I can monitor:

  • earnings reports;
  • dividend payments;
  • stock price behavior;
  • options liquidity;
  • business performance;
  • franchise trends.

If the company becomes more familiar and the options premiums eventually make sense, I may consider selling options on PZZA.

There is no urgency.

The broader principle is straightforward: start small, learn, and avoid forcing trades.

How This Fits My Portfolio Philosophy

My portfolio is not focused only on collecting options premium.

The broader objective is to build a long-term, income-oriented portfolio by combining:

  • options selling;
  • risk management;
  • reinvestment of premium;
  • fractional share purchases;
  • gradual ownership in productive businesses.

Sometimes that means selling bull put spreads. Sometimes it means selling cash-secured puts. Sometimes it means writing covered calls against shares already held.

And sometimes it means doing nothing more than buying 0.5 shares of a company after a real-world observation.

In this case, I could have forced an options trade simply because PZZA has an options chain.

I chose not to.

Buying a small amount of stock was the more reasonable decision because it gave me exposure to the company without creating unnecessary complexity or risk.

Final Thoughts

The main takeaway is not that Papa John's stock is necessarily a buy.

The takeaway is that investment ideas can come from everyday life, but they still require discipline.

A business may be familiar. A stock may appear inexpensive. A dividend may look attractive. An options chain may exist.

None of those factors automatically makes it a good investment or a good trade.

For now, PZZA becomes a small long-term portfolio position and a company I plan to follow more closely.

The pizza was dinner.

The fractional share was a reminder that sometimes the best investment decision is not the most aggressive one. Sometimes it is simply becoming a small owner, learning more, and waiting before doing anything larger.

This article reflects personal investing observations and portfolio activity. It is provided for educational and informational purposes only and should not be considered investment advice, financial advice, tax advice, or a recommendation to buy or sell any security, option, derivative, or financial instrument. All investments involve risk, including the possible loss of principal.

Why I Keep Adding MCD Stock After Visiting McDonald's

Most investing decisions don't happen inside a brokerage account. They happen in everyday life.

Over the years, I've tried to reduce unnecessary spending and make more intentional financial decisions. At the same time, my wife and I try to maintain an active and relatively healthy lifestyle while encouraging the same habits in our daughter. Of course, children are still children.

While we generally prefer home-cooked meals, outdoor activities, and healthier food choices, we still visit McDonald's occasionally or order food for delivery from time to time.

In our household, McDonald's is more of an occasional treat than a regular habit. That eventually led me to create a simple investing rule.

Turning Consumption Into Ownership

Whenever we visit McDonald's, I often buy a small amount of McDonald's stock. Usually, it is just 0.1 shares. The amount itself is not particularly important. The habit is.

After spending the day exploring Dublin, we ended up at a McDonald's restaurant. Afterwards, I added another 0.1 shares of McDonald's stock to my long-term portfolio.

This was not a major investment decision. I did not spend hours analyzing earnings reports or building valuation models. Instead, it was another small step in a habit I have followed for several years.

Teaching Investing Through Everyday Experiences

One of the investing lessons I am trying to teach my daughter is that consumers can also become owners.

Most people interact with businesses every day without thinking about who owns them. Investors tend to look at those same businesses differently.

When you own shares in a company, even a small fraction of one share, your perspective changes. Instead of simply spending money at a business, you also participate in its future success.

McDonald's provides an easy example.

Whether we are in Latvia, Germany, Ireland, or elsewhere, the golden arches are usually nearby. Millions of people visit McDonald's restaurants every day. The business is familiar, easy to understand, and visible almost everywhere.

For teaching basic investing concepts, that familiarity is valuable.

The €4 Strawberry Drink Observation

One thing that stood out during our recent visit was the price of a strawberry-flavored drink. It cost more than €4.

Interestingly, the drink cost more than a latte. I could not help thinking about the economics behind it. The ingredients themselves likely cost relatively little compared with the final selling price, yet customers continue buying these products.

That is not a criticism. It is simply an observation.

McDonald's appears to be adapting to changing consumer preferences by offering products with attractive margins and broad appeal.

Whether it is specialty coffee, desserts, or sweet beverages, the company seems willing to follow consumer trends, and customers appear willing to pay for them.

From an investor's perspective, that can be an encouraging sign.

Am I Bullish on McDonald's?

Not particularly.

I am not aggressively buying McDonald's stock, making a prediction about its future share price, or suggesting that others should buy it.

In fact, I spend considerably less time analyzing McDonald's than some of the companies used in my options portfolio.

What I do believe is that McDonald's has demonstrated remarkable durability as a business.

The company has survived recessions, inflationary periods, changing consumer preferences, and decades of competition. For a long-term investor, that matters.

What About Options?

McDonald's is an optionable stock.

Investors can use strategies such as:

  • Covered calls
  • Cash-secured puts

There are certainly traders who use MCD for these purposes.

Personally, I do not consider McDonald's one of my preferred options-trading stocks. Most of my options activity focuses on companies such as NVIDIA and other positions where option premiums tend to be more attractive.

Still, it is useful to know that options are available should I eventually decide to build a larger position.

Building a Position One Fractional Share at a Time

Over the past few years, these small purchases have accumulated into approximately 4.5 shares of McDonald's stock.

That is obviously nowhere near the 100 shares required to write a standard covered call.

At the current pace, reaching that milestone could take many years. But that is not really the point.

The purpose is not to build a covered call position. The purpose is to slowly accumulate ownership in established businesses.

Every fractional share contributes to the portfolio. Every dividend contributes to future growth. Every purchase also reinforces the habit of thinking like an owner.

Small Purchases Can Become Meaningful Over Time

One of the themes I have been exploring recently is using investment income to gradually acquire productive assets.

In some cases, I use options premium to purchase fractional shares of companies already held in the portfolio. At other times, I simply add small amounts when an opportunity presents itself.

McDonald's fits naturally into that approach.

The position is small, and the purchases are infrequent. However, they serve as a reminder that investing does not always need to involve complicated forecasts, large transactions, or precise market predictions.

Sometimes, investing starts with paying closer attention to the businesses we interact with every day.

Final Thoughts

Will buying 0.1 shares of McDonald's after each visit make me wealthy? Probably not.

But that is not the objective.

The objective is to create a connection between spending and ownership.

It is a simple habit that encourages long-term thinking, reinforces basic investing principles, and creates opportunities to teach those ideas to the next generation.

For now, every occasional visit to McDonald's adds another small piece to the portfolio.

The position itself remains modest, but the lesson behind it may prove far more valuable over time.

This article reflects personal investing habits and observations and is provided for educational and informational purposes only. It should not be considered investment advice, a recommendation to buy or sell securities, or a prediction of future performance. All investments involve risk, including the potential loss of principal.

Building a Drupal Module to Extract Featured Images From Article Content

For more than 10 years I’ve been using a dedicated image field in Drupal content types as a featured image. Back when I originally built the site architecture, this approach made perfect sense. The image field was used for article teasers, category pages, homepage listings, RSS feeds, and later for OpenGraph support so articles would look good when shared on Facebook, Twitter/X, and other social platforms.

At the time, this was considered standard Drupal practice. Every article had a separate “featured image” field, completely independent from the article body itself.

But over the years my publishing workflow changed.

Instead of treating images as metadata attached to content, I started using them more naturally inside the article body itself. Rather than uploading a featured image separately and then inserting additional images into the text, I simply placed the main image directly where it belonged in the article. This is how modern publishing platforms work today. Platforms like Substack, Medium, Ghost, and LinkedIn Articles all assume the content itself defines the visual structure of the article.

Drupal, however, still expected that separate image field.

And that slowly became annoying.

The same image would often appear twice: once at the top of the article as the featured image, and then again inside the article content where I actually wanted readers to see it. On category pages and social previews the featured image still served an important role, but on the article page itself it created duplication and clutter.

For a while I handled this with display settings. I simply hid the featured image field from full article view modes while continuing to display it in teasers, taxonomy pages, and OpenGraph metadata. Technically it worked, but editorially it still felt outdated because every article required uploading the same image twice — once into the image field and once into the content itself.

The Real Goal

What I really wanted was a more modern publishing workflow.

If an article already contains an inline image, especially the first image in the content, Drupal should automatically understand that this is the article’s primary image. That image should then automatically become available everywhere else across the site — teasers, social previews, OpenGraph metadata, category listings, homepage cards, and Views.

In other words, insert the image once and let the system handle the rest automatically.

Building the Solution

At first I assumed there must already be a Drupal module that solved this elegantly. There are several related modules and approaches, but none behaved exactly the way I wanted. Some relied heavily on Media fields, others required complicated template overrides, and a few simply didn’t work reliably with inline CKEditor content. In some cases the extracted image URLs created issues with OpenGraph integration or failed in certain rendering contexts.

So I started debugging and experimenting with my own solution.

The main challenge was extracting inline images cleanly and reliably from rendered article content while keeping compatibility with the rest of the Drupal ecosystem. I needed something lightweight that would not disrupt existing workflows or require rebuilding content structures that had existed for over a decade.

This is where ChatGPT became surprisingly useful.

Instead of spending hours jumping between Drupal API documentation, forum posts, StackOverflow answers, and old Drupal.org issues, I approached the process conversationally. I described the exact workflow problem, tested different implementation ideas, debugged hook behavior, explored render arrays, and refined the logic step by step together with AI assistance.

What people now call “vibe coding” actually turned out to be remarkably effective for this kind of practical problem-solving.

The Module

Here is the module.

Create blog_first_image_sync.info.yml

 

name: Blog First Image Sync
type: module
description: 'Copies the first inline body image into field_images for blog nodes.'
package: Custom
core_version_requirement: ^10 || ^11
dependencies:
 - drupal:node
 - drupal:file
 - drupal:image

 

And create blog_first_image_sync.module

 

<?php

declare(strict_types=1);

use Drupal\node\NodeInterface;

/**
* Implements hook_node_presave().
*/
function blog_first_image_sync_node_presave(NodeInterface $node): void {
 \Drupal::logger('blog_first_image_sync')->notice('Presave fired for node @nid type @type', [
   '@nid' => $node->id() ?? 'new',
   '@type' => $node->bundle(),
 ]);


 if (!$node->hasField('body') || !$node->hasField('field_images')) {
   \Drupal::logger('blog_first_image_sync')->error('Missing required field(s). body: @body field_images: @images', [
     '@body' => $node->hasField('body') ? 'yes' : 'no',
     '@images' => $node->hasField('field_images') ? 'yes' : 'no',
   ]);
   return;
 }

 if ($node->get('body')->isEmpty()) {
   \Drupal::logger('blog_first_image_sync')->notice('Skipping: body empty');
   return;
 }

 $html = (string) $node->get('body')->value;
 \Drupal::logger('blog_first_image_sync')->notice('Body length: @len', [
   '@len' => strlen($html),
 ]);

 if (trim($html) === '') {
   \Drupal::logger('blog_first_image_sync')->notice('Skipping: body blank after trim');
   return;
 }

 libxml_use_internal_errors(TRUE);
 $dom = new \DOMDocument();
 $loaded = $dom->loadHTML('<?xml encoding="utf-8" ?><html><body>' . $html . '</body></html>');
 libxml_clear_errors();

 if (!$loaded) {
   \Drupal::logger('blog_first_image_sync')->error('DOM loadHTML failed');
   return;
 }

 $xpath = new \DOMXPath($dom);
 $nodes = $xpath->query('//img[@data-entity-type="file" and @data-entity-uuid]');

 \Drupal::logger('blog_first_image_sync')->notice('Matched inline images: @count', [
   '@count' => $nodes ? $nodes->length : 0,
 ]);

 if (!$nodes || $nodes->length === 0) {
   \Drupal::logger('blog_first_image_sync')->warning('No matching inline image found in body');
   return;
 }

 $first_image = $nodes->item(0);
 $uuid = $first_image->getAttribute('data-entity-uuid');

 \Drupal::logger('blog_first_image_sync')->notice('Found UUID: @uuid', [
   '@uuid' => $uuid,
 ]);

 if ($uuid === '') {
   \Drupal::logger('blog_first_image_sync')->warning('UUID attribute empty');
   return;
 }

 $entity_repository = \Drupal::service('entity.repository');
 $file = $entity_repository->loadEntityByUuid('file', $uuid);

 if (!$file) {
   \Drupal::logger('blog_first_image_sync')->error('Could not load file entity by UUID @uuid', [
     '@uuid' => $uuid,
   ]);
   return;
 }

 \Drupal::logger('blog_first_image_sync')->notice('Loaded file @fid uri @uri', [
   '@fid' => $file->id(),
   '@uri' => $file->getFileUri(),
 ]);

 $alt = $first_image->getAttribute('alt') ?: '';
 $title = $first_image->getAttribute('title') ?: '';

 $node->set('field_images', [
   [
     'target_id' => $file->id(),
     'alt' => $alt,
     'title' => $title,
   ],
 ]);

 \Drupal::logger('blog_first_image_sync')->notice('field_images set to file ID @fid', [
   '@fid' => $file->id(),
 ]);
}

 

Installation

Save both files inside a folder called blog_first_image_sync, then move that folder into your Drupal /modules/custom/ directory.

After that:

  1. Go to the Drupal admin Modules page
  2. Enable Blog First Image Sync
  3. Clear Drupal cache

Before enabling the module, make sure that field_images is actually the image field used in your content type. The module expects this exact machine name when saving the extracted image.

How It Works

The module automatically extracts the first inline image found inside the article body and saves it into the field_images field for you.

That means you no longer need to:

  • upload the image separately as a featured image
  • maintain duplicate image fields
  • manually sync article visuals

Once the image is synced into field_images, Drupal can continue using it normally everywhere else across the site:

  • teasers
  • Views
  • taxonomy/category pages
  • homepage article listings
  • OpenGraph metadata
  • Facebook previews
  • Twitter/X cards

To make this work properly, keep the field_images field visible in teaser displays, Views, cards, and social metadata integrations. On full article pages you can safely hide the field display to avoid duplicate images appearing both inside the content and above the article.

Final Thoughts

The final result is a much cleaner editorial workflow that behaves more like modern publishing platforms such as Substack or Medium: insert the image once directly into the article, and let the system handle the rest automatically.

AI did not magically generate a perfect solution in one prompt. That’s not how real development works. But it dramatically accelerated experimentation and debugging. Instead of searching for isolated technical answers, I could iteratively explore the problem itself. That reduced friction between idea and implementation in a way that genuinely changed the development experience.

In many ways, this small module reflects a broader shift happening in software development right now. Small workflow annoyances that once stayed unsolved for years suddenly become worth fixing because the cost of experimentation has dropped so much.

And honestly, this particular annoyance had been bothering me for a very long time.

Now the publishing workflow finally feels modern. I insert an image once directly into the article where it belongs, publish the content, and everything else is handled automatically behind the scenes.

Exactly how it should have worked all along.