I haven't been to that part of Italy yet but have done some research for a hoped-for future trip. I'll list some places for you to consider below, just based on what I've read. The city of Udine (population about 100,000, so clearly not a small town) sees few tourists but sounds really interesting, so I went to ViaMichelin.com and asked for a driving route from Ljubljana to Udine. The shortest drive (estimated at 1 hr. 46 min.) would be through Kobarid, Slovenia. I know a few people here have mentioned Kobarid.
If you plot a route on ViaMichelin.com and zoom way in on the map, the most scenic roads will be outlined in green. I see some of that on the way into and out of Kobarid, so that looks like a nice drive.
These are the small towns/villages in Friuli-Venezia Giulia on the list of the “most beautiful villages of Italy”: Clauiano, Cordovado, Fagagna (not too far from Udine), Gradisca d’Isonzo, Palmanova (distinctive round town, but the layout is best seen from the air), Poffabro, Polcenigo, Sappada Vecchia-Plodn (pretty-as-a-picture Alpine village), Sesto al Reghena, Strassoldo, Toppo, Valvasone Arzene and Venzone (walled town surrounded by mountains). I haven't checked a map to see which ones would be geographically convenient for you.
On the way to Udine is the town of Cividale del Friuli, described as "hauntingly picturesque". It's the best place in Europe to see Lombard architecture and art.
San Daniele del Friuli is a major prosciutto-processing area. I think there are weekend tours (not cheap) of the processing plant.
If you like history, Aquileia sounds like an excellent target. Once an important Roman city, it's now a charming rural town, UNESCO-listed. There's an impressive archaeological museum and the Basilica di Santa Maria Assunta, which was under construction from the 4th to the 14th centuries; some impressive mosaics survive. The surrounding area has very important early-Christian ruins and ruins of Roman villas, baths, temples and market buildings.
The resort town of Grado (historically the port for Aquileia) has an atmospheric medieval center and belle epoque mansions along its not-great beaches. It belonged to Austria until the end of WWII. There are multiple nature reserves in the area and some great bird-watching opportunities.
Pordenone is a town of about 50,000 with arcaded streets and frescoed palaces.
Sauris di Sotto and Sauris di Dopra are German-speaking mountain hamlets with dark timber houses.
Tolmezzo is an historic crossing point between Italy and Austria, in a stunning setting. There's a charming historic center (Borgat) with arcaded palazzi. Friulian is still spoken in this area. The Museo Carnico delle Arti e Tradizioni Popolari is an excellent ethnographic museum on mountain life--one of Europe's best.
Another option would be to head toward Trieste. It's a large city (population over 200,000) that wouldn't make the best use of your car, but there are some promising-sounding spots outside the city:
Miramare "Castle" (Victorian-era palace)
Grotta di Gigante (cavern)
Villa Opicina (Slovenian town in Italy)
Muggia (former fishing village)
Val Rosandra (natural wilderness)
Castello di Duino (medieval castle with large garden).
When you decide on a rough route, post here and I'll revisit my notes to see whether I can provide more details. For example, there are at least a couple of WWI museums in the area.