Increment one line but some lines must not show

Take another look at the link in this post and make a copy. I use a helper sheet with unique to get the list images without empty rows, then vlookups to get the determined columns used for a relation back to the original sheet. You could probably do something similar with a query in a helper sheet, some formula to get the row number, then a vlookup to get the row number back into the original sheet.